Skip to content

Commit c9fdc2d

Browse files
author
Samuel Huylebroeck
committed
Fix local variable hiding field
SUP-1555, DEVSIX-832
1 parent e6a139d commit c9fdc2d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,18 +1796,18 @@ public boolean regenerateField() {
17961796
//Copy Bounding box
17971797
bBox = new PdfArray(rect);
17981798
}
1799+
17991800
//Apply field rotation
1800-
float rotation = 0;
1801+
float fieldRotation = 0;
18011802
if(this.getPdfObject().getAsDictionary(PdfName.MK)!= null
18021803
&& this.getPdfObject().getAsDictionary(PdfName.MK).get(PdfName.R) != null){
1803-
rotation = this.getPdfObject().getAsDictionary(PdfName.MK).getAsFloat(PdfName.R);
1804+
fieldRotation = this.getPdfObject().getAsDictionary(PdfName.MK).getAsFloat(PdfName.R);
18041805
}
1805-
//rotation = this.rotation;
1806+
18061807
//Field rotation is specified as counterclockwise
1807-
//rotation *=-1;
1808-
if (rotation % 90 == 0) {
1808+
if (fieldRotation % 90 == 0) {
18091809
//Cast angle to [0, 360]
1810-
double angle = rotation%360;
1810+
double angle = fieldRotation%360;
18111811
//Get angle in radians
18121812
angle = Math.PI * angle / 180;
18131813
//Calculate origin offset

0 commit comments

Comments
 (0)