diff options
author | Robin Gareus <robin@gareus.org> | 2014-05-30 03:04:02 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-05-30 03:04:02 +0200 |
commit | fed5599baa4940f12d8b4edce70cf3c9c762572a (patch) | |
tree | ee3fa72c42dd94838378fd97303420e1092947f2 /libs/canvas/curve.cc | |
parent | 38891288f3ad60c16832829f5c07c458a35051a9 (diff) |
smooth visual curve drawing
Diffstat (limited to 'libs/canvas/curve.cc')
-rw-r--r-- | libs/canvas/curve.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libs/canvas/curve.cc b/libs/canvas/curve.cc index 827dee206d..ce479b28bb 100644 --- a/libs/canvas/curve.cc +++ b/libs/canvas/curve.cc @@ -188,18 +188,9 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const /* draw line between samples */ window_space = item_to_window (Duple (samples[left].x, samples[left].y)); context->move_to (window_space.x, window_space.y); - Coord last_x = round(window_space.x); - Coord last_y = round(window_space.y); for (uint32_t idx = left + 1; idx < right; ++idx) { window_space = item_to_window (Duple (samples[idx].x, samples[idx].y)); - if (last_x == round(window_space.x)) continue; - if (last_y == round(window_space.y)) continue; - last_x = round(window_space.x); - last_y = round(window_space.y); - context->line_to (last_x - .5 , last_y + .5); - } - if (last_x != round(window_space.x) || last_y != round(window_space.y)) { - context->line_to (window_space.x - .5 , window_space.y + .5); + context->line_to (window_space.x, window_space.y); } switch (curve_fill) { |