diff options
author | Sven Gothel <[email protected]> | 2023-03-28 05:04:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-28 05:04:49 +0200 |
commit | 00e38d20592859100353f99407ba44fa5659603b (patch) | |
tree | f6fa92711381fc160f3a6ae3c1ef8f94d93df2e7 /src | |
parent | c315d5be3468514322a619cdb20723bb0bc574f7 (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')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java | 4 |
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 } } } |