Skip to content

Commit dab0673

Browse files
committed
PDFBOX-5660: use quadrantrotate
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1927763 13f79535-47bb-0310-9956-ffa450edef68
1 parent a7ad51c commit dab0673

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,16 @@ public PDFormXObject importPageAsForm(PDDocument sourceDoc, PDPage page) throws
196196
case 90:
197197
at.scale(viewBox.getWidth() / viewBox.getHeight(), viewBox.getHeight() / viewBox.getWidth());
198198
at.translate(0, viewBox.getWidth());
199-
at.rotate(-Math.PI / 2.0);
199+
at.quadrantRotate(3); // 270
200200
break;
201201
case 180:
202202
at.translate(viewBox.getWidth(), viewBox.getHeight());
203-
at.rotate(-Math.PI);
203+
at.quadrantRotate(2); // 180
204204
break;
205205
case 270:
206206
at.scale(viewBox.getWidth() / viewBox.getHeight(), viewBox.getHeight() / viewBox.getWidth());
207207
at.translate(viewBox.getHeight(), 0);
208-
at.rotate(-Math.PI * 1.5);
208+
at.quadrantRotate(1); // 90
209209
break;
210210
default:
211211
//no additional transformations necessary

0 commit comments

Comments
 (0)