From 7914d45f2713341ca5246913c3bef7391f51c9bc Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 6 Jan 2014 20:45:23 -0500 Subject: [PATCH] add missing iterator increment to poly item renders. --- libs/canvas/poly_item.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc index dfd58bcdb0..69afb5ac24 100644 --- a/libs/canvas/poly_item.cc +++ b/libs/canvas/poly_item.cc @@ -64,7 +64,7 @@ PolyItem::compute_bounding_box () const } void -PolyItem::render_path (Rect const & /*area*/, Cairo::RefPtr context) const +PolyItem::render_path (Rect const & /* area */, Cairo::RefPtr context) const { if (_points.size() < 2) { return; @@ -74,6 +74,7 @@ PolyItem::render_path (Rect const & /*area*/, Cairo::RefPtr cont Duple c (item_to_window (Duple (i->x, i->y))); context->move_to (c.x, c.y); + ++i; while (i != _points.end()) { c = item_to_window (Duple (i->x, i->y)); @@ -85,8 +86,6 @@ PolyItem::render_path (Rect const & /*area*/, Cairo::RefPtr cont void PolyItem::render_curve (Rect const & area, Cairo::RefPtr context, Points const & first_control_points, Points const & second_control_points) const { - bool done_first = false; - if (_points.size() <= 2) { render_path (area, context); return; @@ -98,6 +97,7 @@ PolyItem::render_curve (Rect const & area, Cairo::RefPtr context Duple c = item_to_window (Duple (p->x, p->y)); context->move_to (c.x, c.y); + ++p; while (p != _points.end()) {