pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1649092 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Date Fri, 02 Jan 2015 19:02:58 GMT
Author: jahewson
Date: Fri Jan  2 19:02:57 2015
New Revision: 1649092

URL: http://svn.apache.org/r1649092
Log:
Tilman's fix for a rendering regression

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1649092&r1=1649091&r2=1649092&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Fri Jan  2 19:02:57 2015
@@ -336,7 +336,10 @@ public class PDFStreamEngine
         Matrix parentMatrix = initialMatrix;
         initialMatrix = Matrix.concatenate(initialMatrix, patternMatrix);
 
-        // set up a clean state (new clipping path, line path, etc.)
+        // new!
+        saveGraphicsState();
+
+        // SAVE a clean state (new clipping path, line path, etc.)
         Rectangle2D bbox = tilingPattern.getBBox().transform(patternMatrix).getBounds2D();
         PDRectangle rect = new PDRectangle((float)bbox.getX(), (float)bbox.getY(),
                 (float)bbox.getWidth(), (float)bbox.getHeight());
@@ -361,7 +364,8 @@ public class PDFStreamEngine
         processStreamOperators(tilingPattern);
 
         initialMatrix = parentMatrix;
-        restoreGraphicsState();
+        restoreGraphicsState(); // <---- this restores the NEW state, not the original
one
+        restoreGraphicsState(); // new!
         popResources(parent);
     }
 



Mime
View raw message