diff --git a/src/Chart.vala b/src/Chart.vala index ea7b32b..caa1f65 100644 --- a/src/Chart.vala +++ b/src/Chart.vala @@ -104,6 +104,7 @@ namespace CairoChart { /** * TODO: remove all indent fields / evaluate automatically. + * @deprecated 0.1.1 */ public double title_indent = 4; @@ -350,15 +351,6 @@ namespace CairoChart { } } - public virtual Float128 scr2rel_x (Float128 x) { - return zoom.x + (x - plarea.x) / plarea.width * zoom.width; - } - public virtual Float128 scr2rel_y (Float128 y) { - return zoom.y + zoom.height - (plarea.y + plarea.height - y) / plarea.height * zoom.height; - } - public virtual Point scr2rel_point (Point p) { - return Point (scr2rel_x(p.x), scr2rel_y(p.y)); - } public virtual Float128 rel2scr_x(Float128 x) { return plarea.x + plarea.width * (x - zoom.x) / zoom.width; } diff --git a/src/Cursor.vala b/src/Cursor.vala index d9978a1..2d47ea6 100644 --- a/src/Cursor.vala +++ b/src/Cursor.vala @@ -56,7 +56,8 @@ namespace CairoChart { } public virtual void set_active_cursor (Chart chart, Point p, bool remove = false) { - active_cursor = chart.scr2rel_point(p); + active_cursor.x = chart.zoom.x + (p.x - chart.plarea.x) / chart.plarea.width * chart.zoom.width; + active_cursor.y = chart.zoom.y + chart.zoom.height - (chart.plarea.y + chart.plarea.height - p.y) / chart.plarea.height * chart.zoom.height; is_cursor_active = ! remove; }