Skip to content

Commit 8569833

Browse files
committed
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #225
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1928053 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1ab39db commit 8569833

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,17 +287,18 @@ protected void processType3Stream(PDType3CharProc charProc, Matrix textRendering
287287

288288
PDResources parent = pushResources(charProc);
289289
Deque<PDGraphicsState> savedStack = saveGraphicsStack();
290+
PDGraphicsState graphicsState = getGraphicsState();
290291

291292
// replace the CTM with the TRM
292-
getGraphicsState().setCurrentTransformationMatrix(textRenderingMatrix);
293+
graphicsState.setCurrentTransformationMatrix(textRenderingMatrix);
293294

294295
// transform the CTM using the stream's matrix (this is the FontMatrix)
295296
textRenderingMatrix.concatenate(charProc.getMatrix());
296297

297298
// note: we don't clip to the BBox as it is often wrong, see PDFBOX-1917
298299

299-
getGraphicsState().setTextMatrix(new Matrix());
300-
getGraphicsState().setTextLineMatrix(new Matrix());
300+
graphicsState.setTextMatrix(new Matrix());
301+
graphicsState.setTextLineMatrix(new Matrix());
301302

302303
try
303304
{

0 commit comments

Comments
 (0)