X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fcanvas%2Fpoly_item.cc;h=2500ac90e2ea034bb7aea114549856c1cc70a758;hb=fd23ebd0886cd61f8ee68d52d6576d00a16c9032;hp=6c9f0c98ab7ca1e2bb871be734109697de711b57;hpb=31d234b48c36bddb4d5228a3abee9c4419403879;p=ardour.git diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc index 6c9f0c98ab..2500ac90e2 100644 --- a/libs/canvas/poly_item.cc +++ b/libs/canvas/poly_item.cc @@ -70,9 +70,11 @@ PolyItem::render_path (Rect const & /*area*/, Cairo::RefPtr cont bool done_first = false; for (Points::const_iterator i = _points.begin(); i != _points.end(); ++i) { if (done_first) { - context->line_to (i->x, i->y); + Duple c = item_to_window (Duple (i->x, i->y)); + context->line_to (c.x, c.y); } else { - context->move_to (i->x, i->y); + Duple c = item_to_window (Duple (i->x, i->y)); + context->move_to (c.x, c.y); done_first = true; } } @@ -95,16 +97,19 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr context if (done_first) { - context->curve_to (cp1->x, cp1->y, - cp2->x, cp2->y, - i->x, i->y); + Duple c1 = item_to_window (Duple (cp1->x, cp1->y)); + Duple c2 = item_to_window (Duple (cp2->x, cp2->y)); + Duple c3 = item_to_window (Duple (i->x, i->y)); + + context->curve_to (c1.x, c1.y, c2.x, c2.y, c3.x, c3.y); cp1++; cp2++; } else { - context->move_to (i->x, i->y); + Duple c = item_to_window (Duple (i->x, i->y)); + context->move_to (c.x, c.y); done_first = true; } }