summaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-28 05:04:49 +0200
committerSven Gothel <[email protected]>2023-03-28 05:04:49 +0200
commit00e38d20592859100353f99407ba44fa5659603b (patch)
treef6fa92711381fc160f3a6ae3c1ef8f94d93df2e7 /src/graphui/classes/com/jogamp
parentc315d5be3468514322a619cdb20723bb0bc574f7 (diff)
GraphUI Shape.setTransform(): Fix !sameScaleRotatePivot && hasRotate && !hasRotPivot: Don't scale pivot back from center-pivot, same as w/ hasRotPivot
A copy & paste bug ..
Diffstat (limited to 'src/graphui/classes/com/jogamp')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java4
1 files changed, 2 insertions, 2 deletions
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
}
}
}