aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-05 02:26:42 +0200
committerSven Gothel <[email protected]>2023-09-05 02:26:42 +0200
commit6d9c0fc96485da515789921eb9d3ef8988807e54 (patch)
treeb4383fad92182b22d47c1f4f216483d378ac559d
parente06d1d07125fb9489ea45d05fb40a562e2c4ca46 (diff)
GraphUI: Use z-top of bounding box for border rectangle, not z-center
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/GraphShape.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java b/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java
index 3d1a7f2c8..46f2d0a5b 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/GraphShape.java
@@ -255,12 +255,12 @@ public abstract class GraphShape extends Shape {
protected void addBorderOutline() {
final OutlineShape shape = new OutlineShape();
- final Padding dist = null != getPadding() ? getPadding() : new Padding();
- final float x1 = box.getMinX() - dist.left;
- final float x2 = box.getMaxX() + dist.right;
- final float y1 = box.getMinY() - dist.bottom;
- final float y2 = box.getMaxY() + dist.top;
- final float z = box.getCenter().z(); // 0; // box.getMinZ() + 0.025f;
+ final Padding p = null != getPadding() ? getPadding() : new Padding();
+ final float x1 = box.getMinX() - p.left;
+ final float x2 = box.getMaxX() + p.right;
+ final float y1 = box.getMinY() - p.bottom;
+ final float y2 = box.getMaxY() + p.top;
+ final float z = box.getMaxZ(); // on top
{
// Outer OutlineShape as Winding.CCW.
shape.moveTo(x1, y1, z);