diff --git a/CHANGELOG.md b/CHANGELOG.md index 5701193cc..32e58dafd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ Released ... Summary: TODO +- Fixed alpha handling bug with building-fill-opacity (#2011) + - Optimized mapnik.Path.to_wkb - Python: added `__geo_interface__` to mapnik.Feature and mapnik.Path (#2009) diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index d4d7dae05..314b02ca1 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -132,7 +132,7 @@ void agg_renderer::process(building_symbolizer const& sym, path_type faces_path (t_,*faces,prj_trans); ras_ptr->add_path(faces_path); - ren.color(agg::rgba8(int(r*0.8), int(g*0.8), int(b*0.8), int(a * sym.get_opacity()))); + ren.color(agg::rgba8_pre(int(r*0.8), int(g*0.8), int(b*0.8), int(a * sym.get_opacity()))); agg::render_scanlines(*ras_ptr, sl, ren); ras_ptr->reset(); // @@ -166,13 +166,13 @@ void agg_renderer::process(building_symbolizer const& sym, agg::conv_stroke stroke(path); stroke.width(scale_factor_); ras_ptr->add_path(stroke); - ren.color(agg::rgba8(int(r*0.8), int(g*0.8), int(b*0.8), int(a * sym.get_opacity()))); + ren.color(agg::rgba8_pre(int(r*0.8), int(g*0.8), int(b*0.8), int(a * sym.get_opacity()))); agg::render_scanlines(*ras_ptr, sl, ren); ras_ptr->reset(); path_type roof_path (t_,*roof,prj_trans); ras_ptr->add_path(roof_path); - ren.color(agg::rgba8(r, g, b, int(a * sym.get_opacity()))); + ren.color(agg::rgba8_pre(r, g, b, int(a * sym.get_opacity()))); agg::render_scanlines(*ras_ptr, sl, ren); } diff --git a/tests/visual_tests/images/building-symbolizer-opacity-512-512-1.0-agg-reference.png b/tests/visual_tests/images/building-symbolizer-opacity-512-512-1.0-agg-reference.png index 44af5313d..99d578c40 100644 Binary files a/tests/visual_tests/images/building-symbolizer-opacity-512-512-1.0-agg-reference.png and b/tests/visual_tests/images/building-symbolizer-opacity-512-512-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/building-symbolizer-opacity-512-512-2.0-agg-reference.png b/tests/visual_tests/images/building-symbolizer-opacity-512-512-2.0-agg-reference.png index 54bda5e46..c4cc3e52c 100644 Binary files a/tests/visual_tests/images/building-symbolizer-opacity-512-512-2.0-agg-reference.png and b/tests/visual_tests/images/building-symbolizer-opacity-512-512-2.0-agg-reference.png differ