aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
index dd6a272cb..d11e3bdb1 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
@@ -29,6 +29,8 @@ package com.jogamp.graph.ui.shapes;
import com.jogamp.graph.curve.OutlineShape;
import com.jogamp.graph.ui.GraphShape;
+import com.jogamp.opengl.GL2ES2;
+import com.jogamp.opengl.GLProfile;
/**
* A GraphUI Rectangle {@link GraphShape}
@@ -58,7 +60,7 @@ public class Rectangle extends GraphShape {
}
@Override
- protected void addShapeToRegion() {
+ protected void addShapeToRegion(final GLProfile glp, final GL2ES2 gl) {
final OutlineShape shape = new OutlineShape();
final float x1 = 0f;
final float y1 = 0f;
@@ -88,8 +90,11 @@ public class Rectangle extends GraphShape {
}
shape.setIsQuadraticNurbs();
shape.setSharpness(oshapeSharpness);
+
+ updateGLRegion(glp, gl, null, shape);
region.addOutlineShape(shape, null, rgbaColor);
box.resize(shape.getBounds());
+ setRotationPivot( box.getCenter() );
}
@Override