Skip to content

Commit 609981b

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDAbstractAppearanceHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,13 +527,13 @@ PDRectangle handleBorderBox(PDAnnotationSquareCircle annotation, float lineWidth
527527
float[] rectDifferences = annotation.getRectDifferences();
528528
if (rectDifferences.length == 0)
529529
{
530-
borderBox = getPaddedRectangle(getRectangle(), lineWidth / 2);
530+
PDRectangle rect = getRectangle();
531+
borderBox = getPaddedRectangle(rect, lineWidth / 2);
531532
// the differences rectangle
532533
annotation.setRectDifferences(lineWidth / 2);
533-
annotation.setRectangle(addRectDifferences(getRectangle(), annotation.getRectDifferences()));
534+
annotation.setRectangle(addRectDifferences(rect, annotation.getRectDifferences()));
534535
// when the normal appearance stream was generated BBox and Matrix have been set to the
535536
// values of the original /Rect. As the /Rect was changed that needs to be adjusted too.
536-
PDRectangle rect = getRectangle();
537537
PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
538538
AffineTransform transform =
539539
AffineTransform.getTranslateInstance(-rect.getLowerLeftX(), -rect.getLowerLeftY());

0 commit comments

Comments
 (0)