summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-01-13 14:48:26 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-01-13 14:48:26 +0100
commite2a33c97339c821790e3f34593ce251476c3217e (patch)
tree53ace196bc03853b48413f78b5e012cd539b3076 /src
parent297dc48ae210d60725554049ab8d27610cb4172c (diff)
fill control point rectangles
Diffstat (limited to 'src')
-rw-r--r--src/CurveEditor.cxx11
1 files changed, 3 insertions, 8 deletions
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);