From a883f3e2e1563736df32573141fd5119f0678c92 Mon Sep 17 00:00:00 2001
From: Sven Göthel
* The given {@link PMVMatrix4f} has to be setup properly for this object,
* i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene
- * only, without a shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
+ * only, without a shape's {@link #applyMatToMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
*
* The given {@link PMVMatrix4f} has to be setup properly for this object,
* i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene
- * only, without a shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
+ * only, without a shape's {@link #applyMatToMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
*
* The given {@link PMVMatrix4f} has to be setup properly for this object,
* i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene
- * only, without a shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
+ * only, without a shape's {@link #applyMatToMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
*
* The given {@link PMVMatrix4f} has to be setup properly for this object,
* i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene
- * only, without a shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
+ * only, without a shape's {@link #applyMatToMv(PMVMatrix4f)}. See {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti)}.
*
- * {@link #setTransformMv(PMVMatrix4f)} is expected to be completed beforehand.
+ * {@link #transformMvTo(PMVMatrix4f)} is expected to be completed beforehand.
*
- * Shape's origin should be bottom-left @ 0/0 to have build-in drag-zoom work properly.
+ * In case {@link #isMatIdentity()} is {@code true}, implementation is a no-operation.
*
+ * Using this method renders {@link #isMatIdentity()} {@code false},
+ * since its content is mutable. Use {@link #getMat(Matrix4f) instead if suitable.
+ *
+ * Shape's origin should be bottom-left @ 0/0 to have build-in drag-zoom work properly.
+ *
+ * Usually only used internally after modifying position, scale or rotation.
+ *
+ * However, after modifying borrowed values via {@link #getPosition()}, {@link #getScale()}, {@link #getRotation()} or {@link #getRotationPivot()}
+ * without any other change thereafter, e.g. {@link #move(Vec3f)}, this method must be called!
+ *
+ *
+ *
* The given {@link PMVMatrix4f} has to be setup properly for this object, * i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. *
* @param pmv well formed {@link PMVMatrix4f}, e.g. could have been setup via {@link Shape#setPMVMatrix(Scene, PMVMatrix4f)}. * @param viewport the int[4] viewport * @param surfacePort Recti target surface port * @return given Recti {@code surfacePort} for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} operation, otherwise {@code null} */ - public Recti getSurfacePort(final PMVMatrix4f pmv, final Recti viewport, final Recti surfacePort) { + public final Recti getSurfacePort(final PMVMatrix4f pmv, final Recti viewport, final Recti surfacePort) { final Vec3f winCoordHigh = new Vec3f(); final Vec3f winCoordLow = new Vec3f(); final Vec3f high = box.getHigh(); @@ -920,7 +1016,7 @@ public abstract class Shape { ** The given {@link PMVMatrix4f} has to be setup properly for this object, * i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. *
* @param pmv well formed {@link PMVMatrix4f}, e.g. could have been setup via {@link Shape#setPMVMatrix(Scene, PMVMatrix4f)}. * @param viewport the int[4] viewport @@ -929,7 +1025,7 @@ public abstract class Shape { * @see #getSurfaceSize(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f, int[]) * @see #getSurfaceSize(Scene, PMVMatrix4f, int[]) */ - public int[/*2*/] getSurfaceSize(final PMVMatrix4f pmv, final Recti viewport, final int[/*2*/] surfaceSize) { + public final int[/*2*/] getSurfaceSize(final PMVMatrix4f pmv, final Recti viewport, final int[/*2*/] surfaceSize) { // System.err.println("Shape::getSurfaceSize.VP "+viewport[0]+"/"+viewport[1]+" "+viewport[2]+"x"+viewport[3]); final Vec3f winCoordHigh = new Vec3f(); final Vec3f winCoordLow = new Vec3f(); @@ -951,18 +1047,18 @@ public abstract class Shape { * Retrieve surface (view) size in pixels of this shape. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param pmvMatrixSetup {@link Scene.PMVMatrixSetup} to {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} given {@link PMVMatrix4f} {@code pmv}. * @param viewport used viewport for {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param surfaceSize int[2] target surface size * @return given int[2] {@code surfaceSize} in pixels for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} operation, otherwise {@code null} * @see #getSurfaceSize(PMVMatrix4f, Recti, int[]) * @see #getSurfaceSize(Scene, PMVMatrix4f, int[]) */ - public int[/*2*/] getSurfaceSize(final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final PMVMatrix4f pmv, final int[/*2*/] surfaceSize) { + public final int[/*2*/] getSurfaceSize(final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final PMVMatrix4f pmv, final int[/*2*/] surfaceSize) { return getSurfaceSize(setPMVMatrix(pmvMatrixSetup, viewport, pmv), viewport, surfaceSize); } @@ -970,17 +1066,17 @@ public abstract class Shape { * Retrieve surface (view) size in pixels of this shape. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param scene {@link Scene} to retrieve {@link Scene.PMVMatrixSetup} and the viewport. * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param surfaceSize int[2] target surface size * @return given int[2] {@code surfaceSize} in pixels for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} operation, otherwise {@code null} * @see #getSurfaceSize(PMVMatrix4f, Recti, int[]) * @see #getSurfaceSize(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, PMVMatrix4f, int[]) */ - public int[/*2*/] getSurfaceSize(final Scene scene, final PMVMatrix4f pmv, final int[/*2*/] surfaceSize) { + public final int[/*2*/] getSurfaceSize(final Scene scene, final PMVMatrix4f pmv, final int[/*2*/] surfaceSize) { return getSurfaceSize(scene.getPMVMatrixSetup(), scene.getViewport(), pmv, surfaceSize); } @@ -994,7 +1090,7 @@ public abstract class Shape { * @see #getScaledWidth() * @see #getScaledHeight() */ - public float[] getPixelPerShapeUnit(final int[] shapeSizePx, final float[] pixPerShape) { + public final float[] getPixelPerShapeUnit(final int[] shapeSizePx, final float[] pixPerShape) { pixPerShape[0] = shapeSizePx[0] / getScaledWidth(); pixPerShape[0] = shapeSizePx[1] / getScaledHeight(); return pixPerShape; @@ -1005,7 +1101,7 @@ public abstract class Shape { ** The given {@link PMVMatrix4f} has to be setup properly for this object, * i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. *
* @param pmv well formed {@link PMVMatrix4f}, e.g. could have been setup via {@link Shape#setPMVMatrix(Scene, PMVMatrix4f)}. * @param viewport the int[4] viewport @@ -1016,7 +1112,7 @@ public abstract class Shape { * @see #getScaledWidth() * @see #getScaledHeight() */ - public float[] getPixelPerShapeUnit(final PMVMatrix4f pmv, final Recti viewport, final float[] pixPerShape) { + public final float[] getPixelPerShapeUnit(final PMVMatrix4f pmv, final Recti viewport, final float[] pixPerShape) { final int[] shapeSizePx = new int[2]; if( null != getSurfaceSize(pmv, viewport, shapeSizePx) ) { return getPixelPerShapeUnit(shapeSizePx, pixPerShape); @@ -1029,11 +1125,11 @@ public abstract class Shape { * Retrieve pixel per scaled shape-coordinate unit, i.e. [px]/[obj]. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param scene {@link Scene} to retrieve {@link Scene.PMVMatrixSetup} and the viewport. * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param pixPerShape float[2] pixel per scaled shape-coordinate unit result storage * @return given float[2] {@code pixPerShape} for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} operation, otherwise {@code null} * @see #getPixelPerShapeUnit(int[], float[]) @@ -1041,7 +1137,7 @@ public abstract class Shape { * @see #getScaledWidth() * @see #getScaledHeight() */ - public float[] getPixelPerShapeUnit(final Scene scene, final PMVMatrix4f pmv, final float[] pixPerShape) { + public final float[] getPixelPerShapeUnit(final Scene scene, final PMVMatrix4f pmv, final float[] pixPerShape) { final int[] shapeSizePx = new int[2]; if( null != getSurfaceSize(scene, pmv, shapeSizePx) ) { return getPixelPerShapeUnit(shapeSizePx, pixPerShape); @@ -1055,7 +1151,7 @@ public abstract class Shape { ** The given {@link PMVMatrix4f} has to be setup properly for this object, * i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. *
* @param pmv well formed {@link PMVMatrix4f}, e.g. could have been setup via {@link Shape#setPMVMatrix(Scene, PMVMatrix4f)}. * @param viewport the viewport @@ -1065,7 +1161,7 @@ public abstract class Shape { * @see #shapeToWinCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, float[], PMVMatrix4f, int[]) * @see #shapeToWinCoord(Scene, float[], PMVMatrix4f, int[]) */ - public int[/*2*/] shapeToWinCoord(final PMVMatrix4f pmv, final Recti viewport, final Vec3f objPos, final int[/*2*/] glWinPos) { + public final int[/*2*/] shapeToWinCoord(final PMVMatrix4f pmv, final Recti viewport, final Vec3f objPos, final int[/*2*/] glWinPos) { // System.err.println("Shape::objToWinCoordgetSurfaceSize.VP "+viewport[0]+"/"+viewport[1]+" "+viewport[2]+"x"+viewport[3]); final Vec3f winCoord = new Vec3f(); @@ -1081,19 +1177,19 @@ public abstract class Shape { * Map given object coordinate relative to this shape to window coordinates. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param pmvMatrixSetup {@link Scene.PMVMatrixSetup} to {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} given {@link PMVMatrix4f} {@code pmv}. * @param viewport used viewport for {@link PMVMatrix4f#mapObjToWin(Vec3f, Recti, Vec3f)} * @param objPos object position relative to this shape's center * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param glWinPos int[2] target window position of objPos relative to this shape * @return given int[2] {@code glWinPos} for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} operation, otherwise {@code null} * @see #shapeToWinCoord(PMVMatrix4f, Recti, float[], int[]) * @see #shapeToWinCoord(Scene, float[], PMVMatrix4f, int[]) */ - public int[/*2*/] shapeToWinCoord(final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final Vec3f objPos, final PMVMatrix4f pmv, final int[/*2*/] glWinPos) { + public final int[/*2*/] shapeToWinCoord(final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final Vec3f objPos, final PMVMatrix4f pmv, final int[/*2*/] glWinPos) { return this.shapeToWinCoord(setPMVMatrix(pmvMatrixSetup, viewport, pmv), viewport, objPos, glWinPos); } @@ -1101,18 +1197,18 @@ public abstract class Shape { * Map given object coordinate relative to this shape to window coordinates. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param scene {@link Scene} to retrieve {@link Scene.PMVMatrixSetup} and the viewport. * @param objPos object position relative to this shape's center * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param glWinPos int[2] target window position of objPos relative to this shape * @return given int[2] {@code glWinPos} for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} operation, otherwise {@code null} * @see #shapeToWinCoord(PMVMatrix4f, Recti, float[], int[]) * @see #shapeToWinCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, float[], PMVMatrix4f, int[]) */ - public int[/*2*/] shapeToWinCoord(final Scene scene, final Vec3f objPos, final PMVMatrix4f pmv, final int[/*2*/] glWinPos) { + public final int[/*2*/] shapeToWinCoord(final Scene scene, final Vec3f objPos, final PMVMatrix4f pmv, final int[/*2*/] glWinPos) { return this.shapeToWinCoord(scene.getPMVMatrixSetup(), scene.getViewport(), objPos, pmv, glWinPos); } @@ -1121,7 +1217,7 @@ public abstract class Shape { ** The given {@link PMVMatrix4f} has to be setup properly for this object, * i.e. its {@link GLMatrixFunc#GL_PROJECTION} and {@link GLMatrixFunc#GL_MODELVIEW} for the surrounding scene - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. See {@link #setPMVMatrix(Scene, PMVMatrix4f)}. *
* @param pmv well formed {@link PMVMatrix4f}, e.g. could have been setup via {@link Shape#setPMVMatrix(Scene, PMVMatrix4f)}. * @param viewport the Rect4i viewport @@ -1134,7 +1230,7 @@ public abstract class Shape { * @see #winToShapeCoord(com.jogamp.graph.ui.Scene.PMVMatrixSetup, Recti, int, int, PMVMatrix4f, float[]) * @see #winToShapeCoord(Scene, int, int, PMVMatrix4f, float[]) */ - public Vec3f winToShapeCoord(final PMVMatrix4f pmv, final Recti viewport, final int glWinX, final int glWinY, final Vec3f objPos) { + public final Vec3f winToShapeCoord(final PMVMatrix4f pmv, final Recti viewport, final int glWinX, final int glWinY, final Vec3f objPos) { final Vec3f ctr = box.getCenter(); if( Matrix4f.mapObjToWin(ctr, pmv.getPMv(), viewport, objPos) ) { @@ -1150,14 +1246,14 @@ public abstract class Shape { * Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param pmvMatrixSetup {@link Scene.PMVMatrixSetup} to {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} given {@link PMVMatrix4f} {@code pmv}. * @param viewport used viewport for {@link PMVMatrix4f#mapWinToObj(float, float, float, Recti, Vec3f)} * @param glWinX in GL window coordinates, origin bottom-left * @param glWinY in GL window coordinates, origin bottom-left * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param objPos target object position of glWinX/glWinY relative to this shape * @return given {@code objPos} for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} * and {@link Matrix4f#mapWinToObj(float, float, float, float, Matrix4f, Recti, Vec3f, Vec3f) gluUnProject(..)} @@ -1165,7 +1261,7 @@ public abstract class Shape { * @see #winToShapeCoord(PMVMatrix4f, Recti, int, int, float[]) * @see #winToShapeCoord(Scene, int, int, PMVMatrix4f, float[]) */ - public Vec3f winToShapeCoord(final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final int glWinX, final int glWinY, final PMVMatrix4f pmv, final Vec3f objPos) { + public final Vec3f winToShapeCoord(final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final int glWinX, final int glWinY, final PMVMatrix4f pmv, final Vec3f objPos) { return this.winToShapeCoord(setPMVMatrix(pmvMatrixSetup, viewport, pmv), viewport, glWinX, glWinY, objPos); } @@ -1173,13 +1269,13 @@ public abstract class Shape { * Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. ** The given {@link PMVMatrix4f} will be {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) setup} properly for this shape - * including this shape's {@link #setTransformMv(PMVMatrix4f)}. + * including this shape's {@link #transformMvTo(PMVMatrix4f)}. *
* @param scene {@link Scene} to retrieve {@link Scene.PMVMatrixSetup} and the viewport. * @param glWinX in GL window coordinates, origin bottom-left * @param glWinY in GL window coordinates, origin bottom-left * @param pmv a new {@link PMVMatrix4f} which will {@link Scene.PMVMatrixSetup#set(PMVMatrix4f, Recti) be setup}, - * {@link #setTransformMv(PMVMatrix4f) shape-transformed} and can be reused by the caller. + * {@link #transformMvTo(PMVMatrix4f) shape-transformed} and can be reused by the caller. * @param objPos target object position of glWinX/glWinY relative to this shape * @return given {@code objPos} for successful {@link Matrix4f#mapObjToWin(Vec3f, Matrix4f, Recti, Vec3f) gluProject(..)} * and {@link Matrix4f#mapWinToObj(float, float, float, float, Matrix4f, Recti, Vec3f, Vec3f) gluUnProject(..)} diff --git a/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java b/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java index bed4b33eb..bd939f37e 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java +++ b/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java @@ -182,7 +182,7 @@ public class BoxLayout implements Group.Layout { // measure size pmv.pushMv(); - s.setTransformMv(pmv); + s.applyMatToMv(pmv); s.getBounds().transform(pmv.getMv(), sbox); pmv.popMv(); diff --git a/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java b/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java index 43358529a..e77f51aad 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java +++ b/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java @@ -208,7 +208,7 @@ public class GridLayout implements Group.Layout { final Shape s = shapes.get(i); // measure size pmv.pushMv(); - s.setTransformMv(pmv); + s.applyMatToMv(pmv); final AABBox sbox = s.getBounds().transform(pmv.getMv(), new AABBox()); pmv.popMv(); -- cgit v1.2.3