pass map to renderer common (viable after 60a55cb48
, needed for upcoming font changes)
This commit is contained in:
parent
59eb03a346
commit
385a77fc47
6 changed files with 11 additions and 11 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>(
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue