From: Niki Roo Date: Mon, 4 May 2020 16:31:22 +0000 (+0200) Subject: ImageUtilsAwt: fix rotation, now inverts width/height X-Git-Tag: fanfix-swing-1.2.0~22 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=8a9e4b6e66c033919d6a37d8660d15252a7405db;p=fanfix-swing.git ImageUtilsAwt: fix rotation, now inverts width/height --- diff --git a/src/be/nikiroo/utils/ui/ImageUtilsAwt.java b/src/be/nikiroo/utils/ui/ImageUtilsAwt.java index 2919d6b6..19c16a01 100644 --- a/src/be/nikiroo/utils/ui/ImageUtilsAwt.java +++ b/src/be/nikiroo/utils/ui/ImageUtilsAwt.java @@ -214,6 +214,11 @@ public class ImageUtilsAwt extends ImageUtils { } affineTransform.translate(height, 0); affineTransform.rotate(Math.PI / 2); + + int tmp = width; + width = height; + height = tmp; + break; case LEFT: if (affineTransform == null) { @@ -221,6 +226,11 @@ public class ImageUtilsAwt extends ImageUtils { } affineTransform.translate(0, width); affineTransform.rotate(3 * Math.PI / 2); + + int temp = width; + width = height; + height = temp; + break; case UTURN: if (affineTransform == null) {