aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-25 18:42:38 +0200
committerSven Gothel <[email protected]>2023-08-25 18:42:38 +0200
commit090e0368895ccfe46a852cc66c7e2e6a78ee01be (patch)
treed6839398f9e9a881e9366f474d58658e03c2a5c3 /src/graphui/classes/com
parentca49bcc03029156e52dfc29f886501548e9bf397 (diff)
GraphUI: Group API doc + remove GlyphShape's redundant many getOrigPos() variants
Diffstat (limited to 'src/graphui/classes/com')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Group.java6
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java41
2 files changed, 7 insertions, 40 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java
index d82df3a52..80783d94c 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Group.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java
@@ -34,7 +34,6 @@ import java.util.Comparator;
import java.util.List;
import com.jogamp.graph.curve.Region;
-import com.jogamp.graph.curve.opengl.GLRegion;
import com.jogamp.graph.curve.opengl.RegionRenderer;
import com.jogamp.graph.ui.layout.Padding;
import com.jogamp.graph.ui.shapes.Rectangle;
@@ -77,7 +76,7 @@ public class Group extends Shape implements Container {
private Rectangle border = null;
/**
- * Create a Graph based {@link GLRegion} UI {@link Shape}.
+ * Create a group of {@link Shape}s w/o {@link Group.Layout}.
* <p>
* Default is non-interactive, see {@link #setInteractive(boolean)}.
* </p>
@@ -87,10 +86,11 @@ public class Group extends Shape implements Container {
}
/**
- * Create a Graph based {@link GLRegion} UI {@link Shape} w/ given {@link Group.Layour}.
+ * Create a group of {@link Shape}s w/ given {@link Group.Layout}.
* <p>
* Default is non-interactive, see {@link #setInteractive(boolean)}.
* </p>
+ * @param l optional {@link Layout}, maybe {@code null}
*/
public Group(final Layout l) {
super();
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java
index c579cb943..19791d099 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java
@@ -46,7 +46,7 @@ import com.jogamp.opengl.util.texture.TextureSequence;
* Representing a single {@link Font.Glyph} as a {@link GraphShape}
*
* A GlyphShape is represented in font em-size [0..1] unscaled w/ bottom-left origin at 0/0
- * while preserving an intended position, see {@link #getOrigPos()} and {@link #getOrigPos(float)}.
+ * while preserving an intended position, see {@link #getOrigPos()}.
*
* Scaling, if any, should be applied via {@link #setScale(float, float, float)} etc.
*/
@@ -118,41 +118,6 @@ public class GlyphShape extends GraphShape {
* @see #processString(List, int, Font, String)
*/
public Vec3f getOrigPos() { return origPos; }
-
- /**
- * Returns the unscaled original position of this glyph, e.g. if part of a string, otherwise zero.
- *
- * @param s {@link Vec3f} storage to be returned
- * @return storage containing the unscaled original position
- * @see #processString(List, int, Font, String)
- */
- public Vec3f getOrigPos(final Vec3f s) { return s.set(origPos); }
-
- /**
- * Returns a copy of the scaled original position of this glyph, see {@link #getOrigPos(Vec3f)}
- * @see #processString(List, int, Font, String)
- */
- public Vec3f getOrigPos(final float scale) { return origPos.mul(scale); }
-
- /**
- * Returns the scaled original position of this glyph, see {@link #getOrigPos(float)}
- * @param s {@link Vec3f} storage to be returned
- * @return storage containing the scaled original position
- * @see #processString(List, int, Font, String)
- */
- public Vec3f getOrigPos(final Vec3f s, final float scale) { return s.set(origPos).scale(scale); }
-
- /** Resets this Shape's position to the scaled original position, see {@link #getOrigPos(float)}. */
- public void resetPos(final float scale) {
- moveTo(origPos.x() * scale, origPos.y() * scale, 0f);
- }
-
- /** Resets this Shape's position to the scaled original position and {@link #setScale(float, float, float) set scale}, see {@link #resetPos(float)}. */
- public void resetPosAndScale(final float scale) {
- moveTo(origPos.x() * scale, origPos.y() * scale, 0f);
- setScale(scale, scale, 1f);
- }
-
/** Returns {@link Font#getLineHeight()}. */
public float getLineHeight() {
return glyph.getFont().getLineHeight();
@@ -168,7 +133,9 @@ public class GlyphShape extends GraphShape {
* @see #getOrigX()
* @see #getOrigY()
*/
- public static final AABBox processString(final List<GlyphShape> res, final int renderModes, final Font font, final String text) {
+ public static final AABBox processString(final List<GlyphShape> res, final int renderModes,
+ final Font font, final CharSequence text)
+ {
final Font.GlyphVisitor fgv = new Font.GlyphVisitor() {
@Override
public void visit(final char symbol, final Glyph glyph, final AffineTransform t) {