From cee9108e6e879314d3eb910d59a7308d550943b0 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 15 Jul 2008 00:00:48 +0000 Subject: don't call cairo_new_path in feed_pathvector_to_cairo (like the old feed_path_to_cairo didn't do) (bzr r6311) --- src/display/inkscape-cairo.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/display/inkscape-cairo.cpp') diff --git a/src/display/inkscape-cairo.cpp b/src/display/inkscape-cairo.cpp index e41d93952..907f4c3ef 100644 --- a/src/display/inkscape-cairo.cpp +++ b/src/display/inkscape-cairo.cpp @@ -294,7 +294,8 @@ feed_path_to_cairo (cairo_t *ct, Geom::Path const &path, Geom::Matrix trans, NR: } } -/** Feeds path-creating calls to the cairo context translating them from the PathVector, with the given transform and shift */ +/** Feeds path-creating calls to the cairo context translating them from the PathVector, with the given transform and shift + * One must have done cairo_new_path(ct); before calling this function. */ void feed_pathvector_to_cairo (cairo_t *ct, Geom::PathVector const &pathv, Geom::Matrix trans, NR::Maybe area, bool optimize_stroke, double stroke_width) { @@ -303,22 +304,19 @@ feed_pathvector_to_cairo (cairo_t *ct, Geom::PathVector const &pathv, Geom::Matr if (pathv.empty()) return; - cairo_new_path(ct); - for(Geom::PathVector::const_iterator it = pathv.begin(); it != pathv.end(); ++it) { feed_path_to_cairo(ct, *it, trans, area, optimize_stroke, stroke_width); } } -/** Feeds path-creating calls to the cairo context translating them from the PathVector */ +/** Feeds path-creating calls to the cairo context translating them from the PathVector + * One must have done cairo_new_path(ct); before calling this function. */ void feed_pathvector_to_cairo (cairo_t *ct, Geom::PathVector const &pathv) { if (pathv.empty()) return; - cairo_new_path(ct); - for(Geom::PathVector::const_iterator it = pathv.begin(); it != pathv.end(); ++it) { feed_path_to_cairo(ct, *it); } -- cgit v1.2.3