]> git.cworth.org Git - acre/commitdiff
Drop the "tick avoidance" code.
authorCarl Worth <cworth@cworth.org>
Thu, 7 Nov 2013 03:34:54 +0000 (19:34 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 7 Nov 2013 03:34:54 +0000 (19:34 -0800)
This didn't always work, (plotted lines could still run into the ticks
after zooming), so it just provided inconsistent padding around the
edges of the chart.

acre.c

diff --git a/acre.c b/acre.c
index 8c64cadc47484c51181185aa7df7cc28e795cf7a..5e341fd77b8707bd67fbdd07ced58cce149030f4 100644 (file)
--- a/acre.c
+++ b/acre.c
@@ -699,23 +699,6 @@ _compute_axis_ranges (acre_t *acre)
        }
     }
 
-    /* Next, we want to ensure that the data never collides with the
-     * ticks. So we expand each axis on its minimum side as needed. */
-    cairo_save (cr);
-    {
-       double x, y;
-
-       _set_transform_to_data_space (acre);
-
-       x = ACRE_TICK_MAJOR_SIZE + 2.0;
-       y = ACRE_TICK_MAJOR_SIZE + 2.0;
-       cairo_device_to_user_distance (cr, &x, &y);
-
-       acre->x_axis.view_min -= x;
-       acre->y_axis.view_min += y;
-    }
-    cairo_restore (cr);
-
     /* Then, increase the axis ranges just enough so that the step
      * sizes for the ticks will be integers.
      */