Fix PointSymbolizer collision bounding boxes.

This commit is contained in:
Hermann Kraus 2013-03-24 15:50:18 +01:00
parent b1bc5a51b3
commit fe526fd3d6
3 changed files with 3 additions and 2 deletions

View file

@ -72,7 +72,7 @@ void agg_renderer<T>::process(point_symbolizer const& sym,
evaluate_transform(tr, feature, sym.get_image_transform()); evaluate_transform(tr, feature, sym.get_image_transform());
agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine_translation recenter(-center.x, -center.y);
agg::trans_affine recenter_tr = recenter * tr; agg::trans_affine recenter_tr = recenter * tr;
box2d<double> label_ext = bbox * recenter_tr; box2d<double> label_ext = bbox * recenter_tr * agg::trans_affine_scaling(scale_factor_);
for (unsigned i=0; i<feature.num_geometries(); ++i) for (unsigned i=0; i<feature.num_geometries(); ++i)
{ {

View file

@ -697,6 +697,7 @@ void cairo_renderer_base::process(point_symbolizer const& sym,
box2d<double> label_ext (-dx, -dy, dx, dy); box2d<double> label_ext (-dx, -dy, dx, dy);
label_ext *= tr; label_ext *= tr;
label_ext *= agg::trans_affine_translation(x,y); label_ext *= agg::trans_affine_translation(x,y);
label_ext *= agg::trans_affine_scaling(scale_factor_);
if (sym.get_allow_overlap() || if (sym.get_allow_overlap() ||
detector_->has_placement(label_ext)) detector_->has_placement(label_ext))
{ {

View file

@ -74,7 +74,7 @@ void grid_renderer<T>::process(point_symbolizer const& sym,
agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine_translation recenter(-center.x, -center.y);
agg::trans_affine recenter_tr = recenter * tr; agg::trans_affine recenter_tr = recenter * tr;
box2d<double> label_ext = bbox * recenter_tr; box2d<double> label_ext = bbox * recenter_tr * agg::trans_affine_scaling(scale_factor_) ;
for (unsigned i=0; i<feature.num_geometries(); ++i) for (unsigned i=0; i<feature.num_geometries(); ++i)
{ {