diff --git a/include/mapnik/renderer_common.hpp b/include/mapnik/renderer_common.hpp index caf85087c..fc10cdcfc 100644 --- a/include/mapnik/renderer_common.hpp +++ b/include/mapnik/renderer_common.hpp @@ -47,7 +47,7 @@ struct renderer_common : private mapnik::noncopyable renderer_common(Map const &m, attributes const& vars, unsigned offset_x, unsigned offset_y, unsigned width, unsigned height, double scale_factor, std::shared_ptr detector); - renderer_common(request const &req, attributes const& vars, unsigned offset_x, unsigned offset_y, + renderer_common(Map const &m, request const &req, attributes const& vars, unsigned offset_x, unsigned offset_y, unsigned width, unsigned height, double scale_factor); unsigned width_; @@ -63,7 +63,7 @@ struct renderer_common : private mapnik::noncopyable std::shared_ptr detector_; private: - renderer_common(unsigned width, unsigned height, double scale_factor, + renderer_common(Map const &m, unsigned width, unsigned height, double scale_factor, attributes const& vars, view_transform &&t, std::shared_ptr detector); }; diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index 123f4ea11..129765195 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -87,7 +87,7 @@ agg_renderer::agg_renderer(Map const& m, request const& req, attributes c ras_ptr(new rasterizer), gamma_method_(GAMMA_POWER), gamma_(1.0), - common_(req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor) + common_(m, req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor) { setup(m); } diff --git a/src/cairo/cairo_renderer.cpp b/src/cairo/cairo_renderer.cpp index a9db001fd..57b80d252 100644 --- a/src/cairo/cairo_renderer.cpp +++ b/src/cairo/cairo_renderer.cpp @@ -74,7 +74,7 @@ cairo_renderer::cairo_renderer(Map const& m, : feature_style_processor(m, scale_factor), m_(m), context_(cairo), - common_(req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor), + common_(m, req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor), face_manager_(common_.shared_font_engine_) { setup(m); diff --git a/src/grid/grid_renderer.cpp b/src/grid/grid_renderer.cpp index 71ca3bae5..a9a4fc6b2 100644 --- a/src/grid/grid_renderer.cpp +++ b/src/grid/grid_renderer.cpp @@ -71,7 +71,7 @@ grid_renderer::grid_renderer(Map const& m, request const& req, attributes con : feature_style_processor(m, scale_factor), pixmap_(pixmap), ras_ptr(new grid_rasterizer), - common_(req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor) + common_(m, req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor) { setup(m); } diff --git a/src/renderer_common.cpp b/src/renderer_common.cpp index 82d68e4c7..15ba84e89 100644 --- a/src/renderer_common.cpp +++ b/src/renderer_common.cpp @@ -28,7 +28,7 @@ namespace mapnik { -renderer_common::renderer_common(unsigned width, unsigned height, double scale_factor, +renderer_common::renderer_common(Map const& map, unsigned width, unsigned height, double scale_factor, attributes const& vars, view_transform && t, std::shared_ptr detector) @@ -46,7 +46,7 @@ renderer_common::renderer_common(unsigned width, unsigned height, double scale_f renderer_common::renderer_common(Map const &m, attributes const& vars, unsigned offset_x, unsigned offset_y, unsigned width, unsigned height, double scale_factor) - : renderer_common(width, height, scale_factor, + : renderer_common(m, width, height, scale_factor, vars, view_transform(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y), std::make_shared( @@ -57,15 +57,15 @@ renderer_common::renderer_common(Map const &m, attributes const& vars, unsigned renderer_common::renderer_common(Map const &m, attributes const& vars, unsigned offset_x, unsigned offset_y, unsigned width, unsigned height, double scale_factor, std::shared_ptr detector) - : renderer_common(width, height, scale_factor, + : renderer_common(m, width, height, scale_factor, vars, view_transform(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y), detector) {} -renderer_common::renderer_common(request const &req, attributes const& vars, unsigned offset_x, unsigned offset_y, +renderer_common::renderer_common(Map const &m, request const &req, attributes const& vars, unsigned offset_x, unsigned offset_y, unsigned width, unsigned height, double scale_factor) - : renderer_common(width, height, scale_factor, + : renderer_common(m, width, height, scale_factor, vars, view_transform(req.width(),req.height(),req.extent(),offset_x,offset_y), std::make_shared( diff --git a/src/svg/output/svg_renderer.cpp b/src/svg/output/svg_renderer.cpp index 929bfa20c..22f4e1842 100644 --- a/src/svg/output/svg_renderer.cpp +++ b/src/svg/output/svg_renderer.cpp @@ -52,7 +52,7 @@ svg_renderer::svg_renderer(Map const& m, request const& req, attributes cons output_iterator_(output_iterator), generator_(output_iterator), painted_(false), - common_(req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor) + common_(m, req, vars, offset_x, offset_y, req.width(), req.height(), scale_factor) {} template