From e2a33c97339c821790e3f34593ce251476c3217e Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 13 Jan 2008 14:48:26 +0100 Subject: fill control point rectangles --- src/CurveEditor.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/CurveEditor.cxx b/src/CurveEditor.cxx index aa7a90e..0d45bf7 100644 --- a/src/CurveEditor.cxx +++ b/src/CurveEditor.cxx @@ -41,12 +41,7 @@ CurveEditor::draw() { fl_end_line(); for (int i = 0; i < n; i++) { - if (i == marked_point) { - fl_color(FL_RED); - } else { - fl_color(FL_WHITE); - } - fl_rect(x() + w() * X[i] - 2, y() + h() - h() * Y[i] - 2, 4, 4); + fl_rectf(x() + w() * X[i] - 2, y() + h() - h() * Y[i] - 2, 4, 4); } } @@ -80,9 +75,9 @@ CurveEditor::handle(int event) { return 1; case FL_RELEASE: marked_point = -1; - printf("%4f,%4f", X[0], Y[0]); + printf("%.3f,%.3f", X[0], Y[0]); for (int i = 1; i < n; i++) { - printf(";%4f,%4f", X[i], Y[i]); + printf(";%.3f,%.3f", X[i], Y[i]); } printf("\n"); fflush(stdout); -- cgit v1.2.3