pass map to renderer common (viable after 60a55cb48, needed for upcoming font changes)

This commit is contained in:
Dane Springmeyer 2014-09-25 22:37:43 -07:00
parent 59eb03a346
commit 385a77fc47
6 changed files with 11 additions and 11 deletions

View file

@ -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<label_collision_detector4> 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<label_collision_detector4> 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<label_collision_detector4> detector);
};

View file

@ -87,7 +87,7 @@ agg_renderer<T0,T1>::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);
}

View file

@ -74,7 +74,7 @@ cairo_renderer<T>::cairo_renderer(Map const& m,
: feature_style_processor<cairo_renderer>(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);

View file

@ -71,7 +71,7 @@ grid_renderer<T>::grid_renderer(Map const& m, request const& req, attributes con
: feature_style_processor<grid_renderer>(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);
}

View file

@ -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<label_collision_detector4> 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<label_collision_detector4>(
@ -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<label_collision_detector4> 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<label_collision_detector4>(

View file

@ -52,7 +52,7 @@ svg_renderer<T>::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 <typename T>