diff options
author | Sven Gothel <[email protected]> | 2023-03-30 04:41:51 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-30 04:41:51 +0200 |
commit | d959e28119a5a973968d47a988d3dd4b6320db87 (patch) | |
tree | 200f7e776d39a1735a495768131575285bd74714 /src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java | |
parent | 901df212f75db8cf51349f53abeaed6ef62b61d3 (diff) |
GraphUI: Add GlyphShape representing a single Font.Glyph as a GraphShape; Use w/ UISceneDemo03 Type Animation...
A list of GlyphShape can be created via GlyphShape.processString(..),
which preserves all details incl. intended original unscaled position and its kerning.
Whitespace or contourless Glyphs are dropped.
A GlyphShape is represented in font em-size [0..1] unscaled.
+++
UISceneDemo03 Type Animation
- Using GlyphShape and apply scaling via its Shape.setScale()
- Recalc fontScale per used text
- Refined 'arrival' criteria and smoothing out near target w/ speed-up rotation
- Using GraphUIDemoArgs to parse common commandline demo options
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java index 509479cc9..43d174916 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java @@ -209,19 +209,31 @@ public abstract class Shape { System.arraycopy(pivot, 0, rotPivot, 0, 3); } - /** Set scale factor to given scale. */ + /** + * Set scale factor to given scale. + * @see #scale(float, float, float) + * @see #getScale() + */ public final void setScale(final float sx, final float sy, final float sz) { scale[0] = sx; scale[1] = sy; scale[2] = sz; } - /** Multiply current scale factor by given scale. */ + /** + * Multiply current scale factor by given scale. + * @see #setScale(float, float, float) + * @see #getScale() + */ public final void scale(final float sx, final float sy, final float sz) { scale[0] *= sx; scale[1] *= sy; scale[2] *= sz; } - /** Returns float[3] scale factors. */ + /** + * Returns float[3] scale factors. + * @see #setScale(float, float, float) + * @see #scale(float, float, float) + */ public final float[] getScale() { return scale; } /** Returns X-axis scale factor. */ public final float getScaleX() { return scale[0]; } |