diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-18 08:23:06 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-18 08:23:06 -0400 |
commit | 77f5f4c4bf9074d953a1653658c8f96f38ae258c (patch) | |
tree | 08790670f6435eed917ab3f2629a0373652cbc1e /libs/canvas/poly_item.cc | |
parent | a0c5de281a2ba029a9af53a6ffe3a717280998b3 (diff) |
basically operational switch to canvas drawing coordinates, although text and waves don't work, and redraw areas are too small
Diffstat (limited to 'libs/canvas/poly_item.cc')
-rw-r--r-- | libs/canvas/poly_item.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc index 6c9f0c98ab..55ebb46bd3 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<Cairo::Context> 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,15 +97,18 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr<Cairo::Context> 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 { + Duple c = item_to_window (Duple (i->x, i->y)); context->move_to (i->x, i->y); done_first = true; } |