From d2bef3bfc06e52894f1d0763eeac83c870268f88 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Wed, 10 Feb 2010 16:22:29 +0100 Subject: [PATCH] Prevent a redundant closing line segment being added when converting a rectangle, star or polygon to a path. --- src/sp-rect.cpp | 3 +-- src/sp-star.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index d42fd0e9f..bdfae7c99 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -278,10 +278,9 @@ sp_rect_set_shape(SPShape *shape) c->lineto(x + w, y + 0.0); c->lineto(x + w, y + h); c->lineto(x + 0.0, y + h); - c->lineto(x + 0.0, y + 0.0); } - c->closepath_current(); + c->closepath(); sp_shape_set_curve_insync(SP_SHAPE(rect), c, TRUE); c->unref(); } diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 6bced87e8..16c71d030 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -493,9 +493,7 @@ sp_star_set_shape (SPShape *shape) } // draw last segment - if (not_rounded) { - c->lineto(sp_star_get_xy (star, SP_STAR_POINT_KNOT1, 0, true)); - } else { + if (!not_rounded) { if (star->flatsided == false) { c->curveto(sp_star_get_curvepoint (star, SP_STAR_POINT_KNOT2, sides - 1, NEXT), sp_star_get_curvepoint (star, SP_STAR_POINT_KNOT1, 0, PREV), -- 2.30.2