From fe526fd3d6dbf7897a957d92642d600422ee0cce Mon Sep 17 00:00:00 2001 From: Hermann Kraus Date: Sun, 24 Mar 2013 15:50:18 +0100 Subject: [PATCH] Fix PointSymbolizer collision bounding boxes. --- src/agg/process_point_symbolizer.cpp | 2 +- src/cairo_renderer.cpp | 1 + src/grid/process_point_symbolizer.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index c2ff52c14..9db818a43 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -72,7 +72,7 @@ void agg_renderer::process(point_symbolizer const& sym, evaluate_transform(tr, feature, sym.get_image_transform()); agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine recenter_tr = recenter * tr; - box2d label_ext = bbox * recenter_tr; + box2d label_ext = bbox * recenter_tr * agg::trans_affine_scaling(scale_factor_); for (unsigned i=0; i label_ext (-dx, -dy, dx, dy); label_ext *= tr; label_ext *= agg::trans_affine_translation(x,y); + label_ext *= agg::trans_affine_scaling(scale_factor_); if (sym.get_allow_overlap() || detector_->has_placement(label_ext)) { diff --git a/src/grid/process_point_symbolizer.cpp b/src/grid/process_point_symbolizer.cpp index a0d0f05ea..f0230825f 100644 --- a/src/grid/process_point_symbolizer.cpp +++ b/src/grid/process_point_symbolizer.cpp @@ -74,7 +74,7 @@ void grid_renderer::process(point_symbolizer const& sym, agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine recenter_tr = recenter * tr; - box2d label_ext = bbox * recenter_tr; + box2d label_ext = bbox * recenter_tr * agg::trans_affine_scaling(scale_factor_) ; for (unsigned i=0; i