sschwieb commented on a change in pull request #127:
URL: https://github.com/apache/pdfbox/pull/127#discussion_r684561346



##########
File path: pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
##########
@@ -1602,9 +1607,9 @@ private TransparencyGroup(PDTransparencyGroup form, 
boolean isSoftMask, Matrix c
             GeneralPath transformedBox = form.getBBox().transform(transform);
 
             // clip the bbox to prevent giant bboxes from consuming all memory
-            Area clip = 
(Area)getGraphicsState().getCurrentClippingPath().clone();
-            clip.intersect(new Area(transformedBox));
-            Rectangle2D clipRect = clip.getBounds2D();
+            Area transformed = new Area(transformedBox);
+            transformed.intersect(getGraphicsState().getCurrentClippingPath());
+            Rectangle2D clipRect = transformed.getBounds2D();

Review comment:
       Unrelated, but I noticed that the call to `clone()` is not necessary if 
the areas are swapped.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to