From 297dc48ae210d60725554049ab8d27610cb4172c Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 13 Jan 2008 13:18:48 +0100 Subject: print controll points on release --- src/CurveEditor.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/CurveEditor.cxx') diff --git a/src/CurveEditor.cxx b/src/CurveEditor.cxx index cfa6592..aa7a90e 100644 --- a/src/CurveEditor.cxx +++ b/src/CurveEditor.cxx @@ -74,22 +74,23 @@ CurveEditor::handle(int event) { } Fl::focus(this); return 1; - break; case FL_DRAG: set_point(marked_point, (double) mark_x / w(), 1.0 - (double) mark_y / h()); return 1; - break; case FL_RELEASE: marked_point = -1; + printf("%4f,%4f", X[0], Y[0]); + for (int i = 1; i < n; i++) { + printf(";%4f,%4f", X[i], Y[i]); + } + printf("\n"); + fflush(stdout); return 1; - break; case FL_FOCUS: return 1; - break; case FL_UNFOCUS: return 0; - break; } return 0; } @@ -128,10 +129,5 @@ CurveEditor::set_point(int i, double _x, double _y) { Y[i] = _y; gsl_spline_init (spline, X, Y, n); - printf("%4f,%4f", X[0], Y[0]); - for (int i = 1; i < n; i++) { - printf(";%4f,%4f", X[i], Y[i]); - } - printf("\n"); redraw(); } -- cgit v1.2.3