Code

Avoid transforming a group with an already set clip-path
authormiklosh <miklosh@users.sourceforge.net>
Thu, 23 Aug 2007 09:52:05 +0000 (09:52 +0000)
committermiklosh <miklosh@users.sourceforge.net>
Thu, 23 Aug 2007 09:52:05 +0000 (09:52 +0000)
src/extension/internal/pdfinput/pdf-parser.cpp
src/extension/internal/pdfinput/svg-builder.cpp

index 948f0efaaf1b814042de3cd4fdaa09d5fea07b80..b0fbfd7b584f71cc15779ed02427b99050558b11 100644 (file)
@@ -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);
     }
   }
 
index ff206174eeb3d2846d504657095c20536e0baf43..e00b37943f7e0c4bcad5c564e11ffc184acd589f 100644 (file)
@@ -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);
 }