In progress...

This commit is contained in:
Kolan Sh 2018-01-18 17:23:31 +03:00
parent ebd7e17978
commit 87e05a20b2
2 changed files with 2 additions and 17 deletions

View File

@ -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;
}

View File

@ -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);
}
}