From f701b62f84ce28f903c88d39626044514d745e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 12 Dec 2022 18:19:37 +0100 Subject: [PATCH] Registration point drawing on zoom fix --- src/com/jpexs/decompiler/flash/gui/ImagePanel.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index cd1ada04d..b2a6542c8 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -2389,7 +2389,6 @@ public final class ImagePanel extends JPanel implements MediaDisplay { synchronized (ImagePanel.this) { synchronized (lock) { - Reference registrationPointRef = new Reference<>(registrationPoint); Reference boundsRef = new Reference<>(null); RECT rect = timelined.getRectWithStrokes(); @@ -2448,6 +2447,13 @@ public final class ImagePanel extends JPanel implements MediaDisplay { } } + + offsetX += _rect.x; + offsetY += _rect.y; + + Point2D rawRegistrationPoint = registrationPoint == null ? null : new Point2D.Double(registrationPoint.getX() - offsetX, registrationPoint.getY() - offsetY); + Reference registrationPointRef = new Reference<>(rawRegistrationPoint); + if (!autoPlayed) { img = getImagePlay(); @@ -2465,8 +2471,6 @@ public final class ImagePanel extends JPanel implements MediaDisplay { }*/ - offsetX += _rect.x; - offsetY += _rect.y; Rectangle2D newBounds = boundsRef.getVal(); if (newBounds!=null) {