From 21c558ec9a0f0eae7287a5c7fc452b35b463321a Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: 2012年1月28日 15:11:54 +0100 Subject: Improve accuracy of textshape bounding box --- agg-plot/text-shape.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'agg-plot/text-shape.h') diff --git a/agg-plot/text-shape.h b/agg-plot/text-shape.h index 326ca9b8..c09b749e 100644 --- a/agg-plot/text-shape.h +++ b/agg-plot/text-shape.h @@ -44,6 +44,11 @@ namespace draw { virtual void bounding_box(double *x1, double *y1, double *x2, double *y2) { agg::bounding_rect_single(m_sg_text, 0, x1, y1, x2, y2); + const double pad = 1.0; + *x1 -= pad; + *y1 -= pad; + *x2 += pad; + *y2 += pad; } virtual str write_svg(int id, agg::rgba8 c, double h) -- cgit v1.2.3

AltStyle によって変換されたページ (->オリジナル) /