diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-09 17:24:34 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-09 17:24:34 -0500 |
commit | c4f0063a68d189a59450a5bba658fc3092bc936b (patch) | |
tree | 6cf98672e9897a32d90e921a452d56e5efc49567 /libs/canvas/poly_item.cc | |
parent | 77a63c2bf75d4c8fa6948981a246806453bef95c (diff) |
make PolyLine use distance_to_segment_squared(), and add separate (null, for now) method Curve::covers(Duple) because the math there needs to be different, maybe
Diffstat (limited to 'libs/canvas/poly_item.cc')
-rw-r--r-- | libs/canvas/poly_item.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc index b054b70bbf..239ae06e18 100644 --- a/libs/canvas/poly_item.cc +++ b/libs/canvas/poly_item.cc @@ -94,7 +94,13 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> context for (Points::const_iterator i = _points.begin(); i != _points.end(); ++i) { - if (done_first) { + if (!done_first) { + + Duple c = item_to_window (Duple (i->x, i->y)); + context->move_to (c.x, c.y); + done_first = true; + + } else { Duple c1 = item_to_window (Duple (cp1->x, cp1->y)); Duple c2 = item_to_window (Duple (cp2->x, cp2->y)); @@ -104,12 +110,6 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> context cp1++; cp2++; - - } else { - - Duple c = item_to_window (Duple (i->x, i->y)); - context->move_to (c.x, c.y); - done_first = true; } } } |