From a71e8e38414d211daa4c7311171bc1fda7c6d7c7 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Mon, 4 May 2020 18:31:22 +0200 Subject: [PATCH] ImageUtilsAwt: fix rotation, now inverts width/height --- ui/ImageUtilsAwt.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/ImageUtilsAwt.java b/ui/ImageUtilsAwt.java index 2919d6b6..19c16a01 100644 --- a/ui/ImageUtilsAwt.java +++ b/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) { -- 2.27.0