aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2023-09-04 05:16:33 +0200
committerSven Gothel <sgothel@jausoft.com>2023-09-04 06:28:05 +0200
commitd5b17eddf7e7f1c33b269a3a2ed8eca959c6d639 (patch)
tree33bbe008968b174920a453f807a3277b485e5cc3 /src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
parentb161ec3e6527ddfca0de10961de2c984016fe88b (diff)
GraphUI Enhance: API doc; Scene/Button Z-offset and -epsilon; Push temp AffineTransform to local method; Simplify BaseButton setCorner(0) -> setPerp(); Protected abstract ctor ..
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.java41
1 files changed, 41 insertions, 0 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 2b9698e3a..7f9375fc6 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java
@@ -28,10 +28,14 @@
package com.jogamp.graph.ui.shapes;
import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.GLRegion;
import com.jogamp.graph.ui.GraphShape;
+import com.jogamp.graph.ui.Shape;
import com.jogamp.opengl.GL2ES2;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.math.geom.AABBox;
+import com.jogamp.opengl.util.texture.TextureSequence;
/**
* A GraphUI rectangle {@link GraphShape}
@@ -45,6 +49,17 @@ public class Rectangle extends GraphShape {
private float height;
private float lineWidth;
+ /**
+ * Create a rectangular Graph based {@link GLRegion} UI {@link Shape}.
+ *
+ * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}.
+ * @param minX
+ * @param minY
+ * @param width
+ * @param height
+ * @param lineWidth
+ * @param zPos
+ */
public Rectangle(final int renderModes, final float minX, final float minY, final float width, final float height, final float lineWidth, final float zPos) {
super(renderModes);
this.minX = minX;
@@ -55,13 +70,39 @@ public class Rectangle extends GraphShape {
this.lineWidth = lineWidth;
}
+ /**
+ * Create a rectangular Graph based {@link GLRegion} UI {@link Shape}.
+ *
+ * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}.
+ * @param abox
+ * @param lineWidth
+ */
public Rectangle(final int renderModes, final AABBox abox, final float lineWidth) {
this( renderModes, abox.getMinX(), abox.getMinY(), abox.getWidth(), abox.getHeight(), lineWidth, abox.getCenter().z());
}
+ /**
+ * Create a rectangular Graph based {@link GLRegion} UI {@link Shape}.
+ *
+ * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}.
+ * @param minX
+ * @param minY
+ * @param width
+ * @param height
+ * @param lineWidth
+ */
public Rectangle(final int renderModes, final float minX, final float minY, final float width, final float height, final float lineWidth) {
this( renderModes, minX, minY, width, height, lineWidth, 0);
}
+
+ /**
+ * Create a rectangular Graph based {@link GLRegion} UI {@link Shape}.
+ *
+ * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}.
+ * @param width
+ * @param height
+ * @param lineWidth
+ */
public Rectangle(final int renderModes, final float width, final float height, final float lineWidth) {
this( renderModes, 0, 0, width, height, lineWidth, 0);
}