diff options
Diffstat (limited to 'src/graphui/classes')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java | 5 |
1 files changed, 3 insertions, 2 deletions
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 7d1739dd6..d5ba8e289 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java +++ b/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java @@ -128,11 +128,12 @@ public class GridLayout implements Group.Layout { final float sxy = sx < sy ? sx : sy; final float dxh = sbox.getWidth() * ( sx - sxy ) * 0.5f; final float dyh = sbox.getHeight() * ( sy - sxy ) * 0.5f; - s.moveTo( x + dxh, y + dyh, 0f ); + s.moveTo( x + dxh, y + dyh, 0f ); // center the scaled artifact + s.move( sbox.getLow().mul(-1f*sxy) ); // remove the bottom-left delta s.scale( sxy, sxy, 1f); box.resize( x + cellWidth + padding.right, y + cellHeight + padding.top, 0); box.resize( x - padding.left, y - padding.bottom, 0); - // System.err.println("["+row_i+"]["+col_i+"]: "+x+" / "+y); + // System.err.println("["+row_i+"]["+col_i+"]: "+x+" / "+y+", sxy "+sxy+", d[xy]h "+dxh+" x "+dyh+", "+sbox); // position for next cell if( Order.COLUMN == order ) { |