]> git.cworth.org Git - acre/commitdiff
Remove bogus 0.5 offset when setting up data transform.
authorCarl Worth <cworth@cworth.org>
Sun, 25 Jan 2009 16:46:16 +0000 (03:46 +1100)
committerCarl Worth <cworth@cworth.org>
Thu, 16 Apr 2009 19:04:05 +0000 (12:04 -0700)
I think my intuition here had been to provide at least some padding
between the frame and data. But we should do that explicitly (and
correctly) rather than just throwing in a 0.5 offset.

acre.c

diff --git a/acre.c b/acre.c
index 5949a96a1a38ccc37fe48397b0cb3ea3d755e046..0dcf8044ab8a009e2bb2076656998dbd73aed51a 100644 (file)
--- a/acre.c
+++ b/acre.c
@@ -282,8 +282,8 @@ _set_transform_to_data_space (acre_t *acre)
     cairo_t *cr = acre->cr;
 
     cairo_translate (cr,
-                    acre->chart.x + 0.5,
-                    acre->chart.y + acre->chart.height - 0.5);
+                    acre->chart.x,
+                    acre->chart.y + acre->chart.height);
     cairo_scale (cr,
                 acre->chart.width / (acre->x_axis.max - acre->x_axis.min),
                 - acre->chart.height /(acre->y_axis.max - acre->y_axis.min));