summaryrefslogtreecommitdiff
path: root/src/CurveEditor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurveEditor.cxx')
-rw-r--r--src/CurveEditor.cxx16
1 files changed, 6 insertions, 10 deletions
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();
}