From 2398d8bbb09e8892efa28dd7c38b57825e069aa2 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Mon, 6 Feb 2012 11:21:05 +0100 Subject: Fix a bug related to plot's title positioning --- agg-plot/plot.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'agg-plot/plot.h') diff --git a/agg-plot/plot.h b/agg-plot/plot.h index bd2dc600..539b29c0 100644 --- a/agg-plot/plot.h +++ b/agg-plot/plot.h @@ -592,11 +592,12 @@ agg::trans_affine plot::draw_mini_plots(canvas_type& canvas, const double title_text_size = 12.0 * scale; const double th = approx_text_height(title_text_size); - double labx = canvas_mtx.tx + canvas_mtx.sx * 0.5; - double laby = canvas_mtx.sy - (ptpad + dyt + title_text_size); + double x = 0.5, y = 1.0; + canvas_mtx.transform(&x, &y); + y -= ptpad + dyt + title_text_size; draw::text title(m_title.cstr(), title_text_size, line_width, 0.5, 0.0); - title.set_point(labx, laby); + title.set_point(x, y); title.apply_transform(identity_matrix, 1.0); canvas.draw(title, colors::black); -- cgit v1.2.3

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