diff --git a/include/mapnik/cairo_renderer.hpp b/include/mapnik/cairo_renderer.hpp index fbeb0f572..e95233c80 100644 --- a/include/mapnik/cairo_renderer.hpp +++ b/include/mapnik/cairo_renderer.hpp @@ -147,7 +147,6 @@ protected: std::shared_ptr font_engine_; face_manager font_manager_; cairo_face_manager face_manager_; - box2d clip_extent_; std::shared_ptr detector_; box2d query_extent_; void setup(Map const& m); diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index 14b9612d7..74c0b07bc 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -133,9 +133,9 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, font_engine_(std::make_shared()), font_manager_(*font_engine_), face_manager_(font_engine_), - clip_extent_(-m.buffer_size(), -m.buffer_size(), - m.width() + m.buffer_size(), m.height() + m.buffer_size()), - detector_(std::make_shared(clip_extent_)) + detector_(std::make_shared( + box2d(-m.buffer_size(), -m.buffer_size(), + m.width() + m.buffer_size(), m.height() + m.buffer_size()))) { setup(m); } @@ -155,9 +155,9 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, font_engine_(std::make_shared()), font_manager_(*font_engine_), face_manager_(font_engine_), - clip_extent_(-m.buffer_size(), -m.buffer_size(), - m.width() + m.buffer_size(), m.height() + m.buffer_size()), - detector_(std::make_shared(clip_extent_)) + detector_(std::make_shared( + box2d(-m.buffer_size(), -m.buffer_size(), + m.width() + m.buffer_size(), m.height() + m.buffer_size()))) { setup(m); } @@ -177,8 +177,6 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, font_engine_(std::make_shared()), font_manager_(*font_engine_), face_manager_(font_engine_), - clip_extent_(-m.buffer_size(), -m.buffer_size(), - m.width() + m.buffer_size(), m.height() + m.buffer_size()), detector_(detector) { MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: Scale=" << m.scale();