diff options
author | Sven Gothel <[email protected]> | 2023-09-05 02:29:52 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-05 02:29:52 +0200 |
commit | d741d4869221f218d76c3b8c38c83116c07598c0 (patch) | |
tree | 81f22304552986694616ac61c3d4c411014ada02 | |
parent | b91fe4cd16646f134ce8242af30a9f69ecc6ca3e (diff) |
GraphUI Shape: Add setScale(..) and scale(..) with Vec3f for convenience; Add border-color in toString() if hasBorder()
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Shape.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/Shape.java index 43c95c92a..9b45cd36d 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Shape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Shape.java @@ -346,6 +346,15 @@ public abstract class Shape { /** * Set scale factor to given scale. + * @see #scale(Vec3f) + * @see #getScale() + */ + public final Shape setScale(final Vec3f s) { + scale.set(s); + return this; + } + /** + * Set scale factor to given scale. * @see #scale(float, float, float) * @see #getScale() */ @@ -355,6 +364,15 @@ public abstract class Shape { } /** * Multiply current scale factor by given scale. + * @see #setScale(Vec3f) + * @see #getScale() + */ + public final Shape scale(final Vec3f s) { + scale.scale(s); + return this; + } + /** + * Multiply current scale factor by given scale. * @see #setScale(float, float, float) * @see #getScale() */ @@ -1078,8 +1096,8 @@ public abstract class Shape { rotateS = ""; } final String ps = hasPadding() ? padding.toString()+", " : ""; - final String bs = hasBorder() ? "Border "+getBorderThickness()+", " : ""; - return getDirtyString()+", enabled "+enabled+", toggle[able "+toggleable+", state "+toggle+ + final String bs = hasBorder() ? "border[l "+getBorderThickness()+", c "+getBorderColor()+"], " : ""; + return getDirtyString()+", id "+name+", enabled "+enabled+", toggle[able "+toggleable+", state "+toggle+ "], able[iactive "+isInteractive()+", resize "+isResizable()+", move "+this.isDraggable()+ "], pos["+position+"], "+pivotS+scaleS+rotateS+ ps+bs+"box"+box; |