From 00e38d20592859100353f99407ba44fa5659603b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 28 Mar 2023 05:04:49 +0200 Subject: GraphUI Shape.setTransform(): Fix !sameScaleRotatePivot && hasRotate && !hasRotPivot: Don't scale pivot back from center-pivot, same as w/ hasRotPivot A copy & paste bug .. --- src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java index 94fc471f2..5641b3ff4 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java @@ -453,9 +453,9 @@ public abstract class Shape { pmv.glTranslatef(-rotOrigin[0], -rotOrigin[1], -rotOrigin[2]); // pivot to rot-pivot } else { // Rotate shape around its center - pmv.glTranslatef(ctr[0]*scale[0], ctr[1]*scale[1], ctr[2]*scale[2]); // add-back center, scaled + pmv.glTranslatef(ctr[0], ctr[1], ctr[2]); // pivot back from center-pivot pmv.glRotate(rotation); - pmv.glTranslatef(-ctr[0], -ctr[1], -ctr[2]); // move to center + pmv.glTranslatef(-ctr[0], -ctr[1], -ctr[2]); // pivot to center-pivot } } } -- cgit v1.2.3