From: Carl Worth Date: Sun, 25 Jan 2009 16:46:16 +0000 (+1100) Subject: Remove bogus 0.5 offset when setting up data transform. X-Git-Url: https://git.cworth.org/git?p=acre;a=commitdiff_plain;h=e77e5c22bb7136b35963a58d3a1a8ffb080a7e87 Remove bogus 0.5 offset when setting up data transform. 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. --- diff --git a/acre.c b/acre.c index 5949a96..0dcf804 100644 --- 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));