From 87e05a20b2b74c9336d68e3684ed069715e19465 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 18 Jan 2018 17:23:31 +0300 Subject: [PATCH] In progress... --- src/Chart.vala | 16 ---------------- src/Series.vala | 3 ++- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/Chart.vala b/src/Chart.vala index 8a7eff3..ea7b32b 100644 --- a/src/Chart.vala +++ b/src/Chart.vala @@ -350,22 +350,6 @@ namespace CairoChart { } } - protected virtual bool x_in_plot_area (double x) { - if (math.x_in_range(x, plarea.x, plarea.x + plarea.width)) - return true; - return false; - } - protected virtual bool y_in_plot_area (double y) { - if (math.y_in_range(y, plarea.y, plarea.y + plarea.height)) - return true; - return false; - } - public virtual bool point_in_plot_area (Point p) { - if (math.point_in_rect (p, plarea.x, plarea.x + plarea.width, plarea.y, plarea.y + plarea.height)) - return true; - return false; - } - public virtual Float128 scr2rel_x (Float128 x) { return zoom.x + (x - plarea.x) / plarea.width * zoom.width; } diff --git a/src/Series.vala b/src/Series.vala index a57a2a9..dadb6b8 100644 --- a/src/Series.vala +++ b/src/Series.vala @@ -84,7 +84,8 @@ namespace CairoChart { for (int i = 0; i < points.length; ++i) { var x = get_scr_x(points[i].x); var y = get_scr_y(points[i].y); - if (chart.point_in_plot_area (Point (x, y))) + if (chart.math.point_in_rect (Point(x, y), chart.plarea.x, chart.plarea.x + chart.plarea.width, + chart.plarea.y, chart.plarea.y + chart.plarea.height)) marker.draw_at_pos(chart, x, y); } }