Skip to content

Commit 806008c

Browse files
committed
Move linkAnnotation under Image-tag in tag hierarchy
DEVSIX-1229
1 parent 80890bd commit 806008c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

layout/src/main/java/com/itextpdf/layout/renderer/ImageRenderer.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -285,18 +285,6 @@ public void draw(DrawContext drawContext) {
285285
fixedXPosition = occupiedArea.getBBox().getX();
286286
}
287287

288-
Float angle = this.getPropertyAsFloat(Property.ROTATION_ANGLE);
289-
if (angle != null) {
290-
fixedXPosition += rotatedDeltaX;
291-
fixedYPosition -= rotatedDeltaY;
292-
drawContext.getCanvas().saveState();
293-
applyConcatMatrix(drawContext, angle);
294-
}
295-
super.draw(drawContext);
296-
if (angle != null) {
297-
drawContext.getCanvas().restoreState();
298-
}
299-
300288
PdfDocument document = drawContext.getDocument();
301289
boolean isTagged = drawContext.isTaggingEnabled();
302290
boolean modelElementIsAccessible = isTagged && getModelElement() instanceof IAccessibleElement;
@@ -320,6 +308,18 @@ public void draw(DrawContext drawContext) {
320308
}
321309
}
322310

311+
Float angle = this.getPropertyAsFloat(Property.ROTATION_ANGLE);
312+
if (angle != null) {
313+
fixedXPosition += rotatedDeltaX;
314+
fixedYPosition -= rotatedDeltaY;
315+
drawContext.getCanvas().saveState();
316+
applyConcatMatrix(drawContext, angle);
317+
}
318+
super.draw(drawContext);
319+
if (angle != null) {
320+
drawContext.getCanvas().restoreState();
321+
}
322+
323323
PdfCanvas canvas = drawContext.getCanvas();
324324
if (isTagged) {
325325
if (isArtifact) {

0 commit comments

Comments
 (0)