remove dead code (colorize-alpha is now officially an image-filter)
This commit is contained in:
parent
5e1f1c2b79
commit
2c46300f61
4 changed files with 1 additions and 66 deletions
60
deps/agg/include/agg_pixfmt_rgba.h
vendored
60
deps/agg/include/agg_pixfmt_rgba.h
vendored
|
@ -1444,68 +1444,8 @@ namespace agg
|
|||
}
|
||||
};
|
||||
|
||||
// colorize alpha values
|
||||
// TODO - consider moving to image-filters:
|
||||
// https://github.com/mapnik/mapnik/issues/1371
|
||||
/*
|
||||
template <typename ColorT, typename Order>
|
||||
struct comp_op_rgba_colorize_alpha
|
||||
{
|
||||
typedef ColorT color_type;
|
||||
typedef Order order_type;
|
||||
typedef typename color_type::value_type value_type;
|
||||
typedef typename color_type::calc_type calc_type;
|
||||
typedef typename color_type::long_type long_type;
|
||||
enum base_scale_e
|
||||
{
|
||||
base_shift = color_type::base_shift,
|
||||
base_mask = color_type::base_mask
|
||||
};
|
||||
|
||||
static AGG_INLINE void blend_pix(value_type* p,
|
||||
// source rgb
|
||||
unsigned sr, unsigned sg, unsigned sb,
|
||||
// source alpha and opacity
|
||||
unsigned sa, unsigned cover)
|
||||
{
|
||||
if(cover < 255)
|
||||
{
|
||||
sr = (sr * cover + 255) >> 8;
|
||||
sg = (sg * cover + 255) >> 8;
|
||||
sb = (sb * cover + 255) >> 8;
|
||||
sa = (sa * cover + 255) >> 8;
|
||||
}
|
||||
if (sa > 0)
|
||||
{
|
||||
p[Order::R] = (value_type)(((0 + base_mask) >> base_shift));
|
||||
p[Order::G] = (value_type)(((0 + base_mask) >> base_shift));
|
||||
p[Order::B] = (value_type)(((0 + base_mask) >> base_shift));
|
||||
p[Order::A] = (value_type)(sa + p[Order::A] - ((sa * p[Order::A] + base_mask) >> base_shift));
|
||||
// http://en.wikipedia.org/wiki/File:HSV-RGB-comparison.svg
|
||||
if (p[Order::A] < 64) {
|
||||
p[Order::G] = ((p[Order::A] - 64) * 4);
|
||||
p[Order::B] = 255;
|
||||
}
|
||||
if (p[Order::A] >= 64 && p[Order::A] < 128) {
|
||||
p[Order::G] = 255;
|
||||
p[Order::B] = 255 - ((p[Order::A] - 64) * 4);
|
||||
}
|
||||
if (p[Order::A] >= 128 && p[Order::A] < 192) {
|
||||
p[Order::R] = ((p[Order::A] - 128) * 4);
|
||||
p[Order::G] = 255;
|
||||
}
|
||||
if (p[Order::A] >= 192) {
|
||||
p[Order::R] = 255;
|
||||
p[Order::G] = 255 - ((p[Order::A] - 192) * 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
// grain extract (GIMP)
|
||||
// E = I - M + 128
|
||||
|
||||
template <typename ColorT, typename Order>
|
||||
struct comp_op_rgba_grain_extract
|
||||
{
|
||||
|
|
|
@ -75,7 +75,6 @@ enum composite_mode_e
|
|||
saturation,
|
||||
_color,
|
||||
_value
|
||||
//colorize_alpha
|
||||
};
|
||||
|
||||
MAPNIK_DECL boost::optional<composite_mode_e> comp_op_from_string(std::string const& name);
|
||||
|
|
|
@ -75,7 +75,6 @@ static const comp_op_lookup_type comp_lookup = boost::assign::list_of<comp_op_lo
|
|||
(saturation,"saturation")
|
||||
(_color,"color")
|
||||
(_value,"value")
|
||||
//(colorize_alpha,"colorize-alpha")
|
||||
;
|
||||
|
||||
boost::optional<composite_mode_e> comp_op_from_string(std::string const& name)
|
||||
|
|
|
@ -8,10 +8,7 @@
|
|||
</Rule>
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
<Style name="style" comp-op="colorize-alpha">
|
||||
-->
|
||||
<Style name="style">
|
||||
<Style name="style" image-filters="colorize-alpha(blue,purple,red,orange,yellow,green)">
|
||||
<Rule>
|
||||
<PointSymbolizer file="../images/marker.png" allow-overlap="true" />
|
||||
</Rule>
|
||||
|
|
Loading…
Add table
Reference in a new issue