From: johanengelen Date: Tue, 15 Jul 2008 00:00:48 +0000 (+0000) Subject: don't call cairo_new_path in feed_pathvector_to_cairo (like the old feed_path_to_cair... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8b84770bd7e7de803997c3f7d1e31fb826bd065;p=inkscape.git don't call cairo_new_path in feed_pathvector_to_cairo (like the old feed_path_to_cairo didn't do) --- 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); } diff --git a/src/extension/internal/pdf-cairo.cpp b/src/extension/internal/pdf-cairo.cpp index bd1f2433c..0ff571275 100644 --- a/src/extension/internal/pdf-cairo.cpp +++ b/src/extension/internal/pdf-cairo.cpp @@ -599,6 +599,7 @@ PrintCairoPDF::fill(Inkscape::Extension::Print *mod, Geom::PathVector const &pat print_fill_style(cr, style, pbox); + cairo_new_path(cr); feed_pathvector_to_cairo(cr, pathv); if (style->fill_rule.computed == SP_WIND_RULE_EVENODD) { @@ -697,6 +698,7 @@ PrintCairoPDF::stroke(Inkscape::Extension::Print *mod, Geom::PathVector const &p cairo_save(cr); + cairo_new_path(cr); print_stroke_style(cr, style, pbox); feed_pathvector_to_cairo(cr, pathv);