pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1657477 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java
Date Thu, 05 Feb 2015 04:53:09 GMT
Author: jahewson
Date: Thu Feb  5 04:53:08 2015
New Revision: 1657477

URL: http://svn.apache.org/r1657477
Log:
PDFBOX-2668: Perform a deep copy when intersecting clipping paths

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java?rev=1657477&r1=1657476&r2=1657477&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java
Thu Feb  5 04:53:08 2015
@@ -562,7 +562,10 @@ public class PDGraphicsState implements
         // lazy cloning of clipping path for performance
         if (!isClippingPathDirty)
         {
-            clippingPath = (Area) clippingPath.clone();
+            // deep copy (can't use clone() as it performs only a shallow copy)
+            Area cloned = new Area();
+            cloned.add(clippingPath);
+            
             isClippingPathDirty = true;
         }
 



Mime
View raw message