Fix a bug related to plot's title positioning - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/plot.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年02月06日 11:21:05 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年02月06日 21:43:56 +0100
commit2398d8bbb09e8892efa28dd7c38b57825e069aa2 (patch)
treedae85766925be5d0e8d34b0a941b08a067a84591 /agg-plot/plot.h
parenta0570c9bf3a331e7dc22469fb3f0af1e9c6e532c (diff)
downloadgsl-shell-2398d8bbb09e8892efa28dd7c38b57825e069aa2.tar.gz
Fix a bug related to plot's title positioning
Diffstat (limited to 'agg-plot/plot.h')
-rw-r--r--agg-plot/plot.h 7
1 files changed, 4 insertions, 3 deletions
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<VS,RM>::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);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月14日 10:54:09 +0000

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