From: miklosh Date: Thu, 23 Aug 2007 09:52:05 +0000 (+0000) Subject: Avoid transforming a group with an already set clip-path X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dd6d813ffad339352c39dc0645a792bdd9d8315c;p=inkscape.git Avoid transforming a group with an already set clip-path --- diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 948f0efaa..b0fbfd7b5 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -1465,9 +1465,9 @@ void PdfParser::doShadingPatternFillFallback(GfxShadingPattern *sPat, } else { state->clip(); if (eoFill) { - builder->clip(state, true); + builder->setClipPath(state, true); } else { - builder->clip(state); + builder->setClipPath(state); } } diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index ff206174e..e00b37943 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -549,6 +549,10 @@ bool SvgBuilder::getTransform(double *transform) { void SvgBuilder::setTransform(double c0, double c1, double c2, double c3, double c4, double c5) { + // Avoid transforming a group with an already set clip-path + if ( _container->attribute("clip-path") != NULL ) { + pushGroup(); + } TRACE(("setTransform: %f %f %f %f %f %f\n", c0, c1, c2, c3, c4, c5)); svgSetTransform(_container, c0, c1, c2, c3, c4, c5); }