Fixed imagetag.getShape (caused by changing scale of matrix to float earlier)

This commit is contained in:
Jindra Petřík
2024-07-22 20:52:51 +02:00
parent a7bc2c544b
commit 98317a9104

View File

@@ -188,10 +188,10 @@ public abstract class ImageTag extends DrawableTag {
matrix.hasScale = true;
if (fill) {
RECT imageRect = getRect();
matrix.scaleX = (int) ((((long) SWF.unitDivisor) << 16) * rect.getWidth() / imageRect.getWidth());
matrix.scaleY = (int) ((((long) SWF.unitDivisor) << 16) * rect.getHeight() / imageRect.getHeight());
matrix.scaleX = (float) (SWF.unitDivisor * rect.getWidth() / imageRect.getWidth());
matrix.scaleY = (float) (SWF.unitDivisor * rect.getHeight() / imageRect.getHeight());
} else {
matrix.scaleX = ((int) SWF.unitDivisor) << 16;
matrix.scaleX = (float) SWF.unitDivisor;
matrix.scaleY = matrix.scaleX;
}
if (translated) {