From c2385437f1e040a01fd182d081d1ff6510ada492 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 19 Sep 2014 14:15:21 -0700 Subject: [PATCH] apply fix from #2418 to 2.3.x branch --- include/mapnik/agg_renderer.hpp | 2 ++ include/mapnik/cairo_renderer.hpp | 6 ++++++ include/mapnik/feature_style_processor_impl.hpp | 2 +- include/mapnik/grid/grid_renderer.hpp | 8 ++++++++ src/agg/agg_renderer.cpp | 6 ++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/mapnik/agg_renderer.hpp b/include/mapnik/agg_renderer.hpp index 49275d668..bcbc43898 100644 --- a/include/mapnik/agg_renderer.hpp +++ b/include/mapnik/agg_renderer.hpp @@ -127,6 +127,8 @@ public: } void painted(bool painted); + bool painted(); + inline eAttributeCollectionPolicy attribute_collection_policy() const { return DEFAULT; diff --git a/include/mapnik/cairo_renderer.hpp b/include/mapnik/cairo_renderer.hpp index c2278231d..982f6ae29 100644 --- a/include/mapnik/cairo_renderer.hpp +++ b/include/mapnik/cairo_renderer.hpp @@ -115,6 +115,12 @@ public: // cairo renderer doesn't support processing of multiple symbolizers. return false; } + + bool painted() + { + return true; + } + void painted(bool /*painted*/) { // nothing to do diff --git a/include/mapnik/feature_style_processor_impl.hpp b/include/mapnik/feature_style_processor_impl.hpp index 0d1ae657a..4de0fdcc7 100644 --- a/include/mapnik/feature_style_processor_impl.hpp +++ b/include/mapnik/feature_style_processor_impl.hpp @@ -704,7 +704,7 @@ void feature_style_processor::render_style( } } } - p.painted(was_painted); + p.painted(p.painted() | was_painted); p.end_style_processing(*style); } diff --git a/include/mapnik/grid/grid_renderer.hpp b/include/mapnik/grid/grid_renderer.hpp index 8abf326be..e34e247d4 100644 --- a/include/mapnik/grid/grid_renderer.hpp +++ b/include/mapnik/grid/grid_renderer.hpp @@ -114,14 +114,22 @@ public: // grid renderer doesn't support processing of multiple symbolizers. return false; } + + bool painted() + { + pixmap_.painted(); + } + void painted(bool painted) { pixmap_.painted(painted); } + inline eAttributeCollectionPolicy attribute_collection_policy() const { return DEFAULT; } + inline double scale_factor() const { return scale_factor_; diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index 15d5559e1..84abb223d 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -457,6 +457,12 @@ void agg_renderer::painted(bool painted) pixmap_.painted(painted); } +template +bool agg_renderer::painted() +{ + return pixmap_.painted(); +} + template void agg_renderer::debug_draw_box(box2d const& box, double x, double y, double angle)