You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2025/08/26 19:05:57 UTC
svn commit: r1928030 - pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream
Author: tilman
Date: Tue Aug 26 19:05:57 2025
New Revision: 1928030
Log:
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #224
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Tue Aug 26 19:05:52 2025 (r1928029)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Tue Aug 26 19:05:57 2025 (r1928030)
@@ -198,14 +198,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
{
processTransparencyGroup(group);