Author: tilman
Date: Tue Aug 26 19:06:01 2025
New Revision: 1928031

Log:
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #224

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
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
      Tue Aug 26 19:05:57 2025        (r1928030)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
      Tue Aug 26 19:06:01 2025        (r1928031)
@@ -199,14 +199,15 @@ public abstract class PDFStreamEngine
     protected void processSoftMask(PDTransparencyGroup group) throws 
IOException
     {
         saveGraphicsState();
-        Matrix softMaskCTM = 
getGraphicsState().getSoftMask().getInitialTransformationMatrix();
-        getGraphicsState().setCurrentTransformationMatrix(softMaskCTM);
-        getGraphicsState().setTextMatrix(new Matrix());
-        getGraphicsState().setTextLineMatrix(new Matrix());
-        getGraphicsState().setNonStrokingColorSpace(PDDeviceGray.INSTANCE);
-        
getGraphicsState().setNonStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
-        getGraphicsState().setStrokingColorSpace(PDDeviceGray.INSTANCE);
-        
getGraphicsState().setStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
+        PDGraphicsState graphicsState = getGraphicsState();
+        Matrix softMaskCTM = 
graphicsState.getSoftMask().getInitialTransformationMatrix();
+        graphicsState.setCurrentTransformationMatrix(softMaskCTM);
+        graphicsState.setTextMatrix(new Matrix());
+        graphicsState.setTextLineMatrix(new Matrix());
+        graphicsState.setNonStrokingColorSpace(PDDeviceGray.INSTANCE);
+        
graphicsState.setNonStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
+        graphicsState.setStrokingColorSpace(PDDeviceGray.INSTANCE);
+        
graphicsState.setStrokingColor(PDDeviceGray.INSTANCE.getInitialColor());
 
         try
         {

Reply via email to