diff options
author | Sven Gothel <sgothel@jausoft.com> | 2023-03-27 14:12:01 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2023-03-27 14:12:01 +0200 |
commit | 9b91a24ee6f383ca53556c466d84baf56f16940b (patch) | |
tree | 42379ffbfe2c41835ba9418ecb98fa7251e90868 /src/jogl/classes | |
parent | 0cea1ffbf415d40b9cff582b15fb5b736ae42580 (diff) |
Graph Font: Rename getBBox*() -> getBounds*() to preserve a common semantic name
Diffstat (limited to 'src/jogl/classes')
4 files changed, 14 insertions, 14 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java index 2a75a203f..d9f59d132 100644 --- a/src/jogl/classes/com/jogamp/graph/font/Font.java +++ b/src/jogl/classes/com/jogamp/graph/font/Font.java @@ -145,13 +145,13 @@ public interface Font { * @param dest AABBox instance set to this metrics boundary in font-units * @return the given and set AABBox 'dest' in font units */ - AABBox getBBoxFU(final AABBox dest); + AABBox getBoundsFU(final AABBox dest); /** * @param dest AABBox instance set to this metrics boundary in font em-size [0..1] * @return the given and set AABBox 'dest' in font units */ - AABBox getBBox(final AABBox dest, final float[] tmpV3); + AABBox getBounds(final AABBox dest, final float[] tmpV3); } /** @@ -178,14 +178,14 @@ public interface Font { /** * Return the AABBox in font-units, borrowing internal instance. */ - AABBox getBBoxFU(); + AABBox getBoundsFU(); /** * Return the AABBox in font-units, copying into given dest. * @param dest AABBox instance set to this metrics boundary in font-units * @return the given and set AABBox 'dest' in font-units */ - AABBox getBBoxFU(final AABBox dest); + AABBox getBoundsFU(final AABBox dest); /** * Return the AABBox in font em-size [0..1], copying into given dest. @@ -193,12 +193,12 @@ public interface Font { * @param tmpV3 caller provided temporary 3-component vector * @return the given and set AABBox 'dest' in font em-size [0..1] */ - AABBox getBBox(final AABBox dest, float[] tmpV3); + AABBox getBounds(final AABBox dest, float[] tmpV3); /** * Return the AABBox in font em-size [0..1], creating a new copy. */ - AABBox getBBox(); + AABBox getBounds(); /** Return advance in font units, sourced from `hmtx` table. */ int getAdvanceFU(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index 38c17e547..7dc20e47f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -339,7 +339,7 @@ class TypecastFont implements Font { advanceTotal += left_glyph.getKerningFU(glyph_id); } temp1.translate(advanceTotal, y, temp2); - res.resize(temp1.transform(glyph.getBBoxFU(), temp_box)); + res.resize(temp1.transform(glyph.getBoundsFU(), temp_box)); advanceTotal += glyph.getAdvanceFU(); left_glyph = glyph; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index d8864fb65..d62314e8d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -137,18 +137,18 @@ public final class TypecastGlyph implements Font.Glyph { public final boolean isWhiteSpace() { return this.isWhiteSpace; } @Override - public final AABBox getBBoxFU() { return bbox; } + public final AABBox getBoundsFU() { return bbox; } @Override - public final AABBox getBBoxFU(final AABBox dest) { return dest.copy(bbox); } + public final AABBox getBoundsFU(final AABBox dest) { return dest.copy(bbox); } @Override - public final AABBox getBBox(final AABBox dest, final float[] tmpV3) { + public final AABBox getBounds(final AABBox dest, final float[] tmpV3) { return dest.copy(bbox).scale2(1.0f/font.getMetrics().getUnitsPerEM(), tmpV3); } @Override - public final AABBox getBBox() { + public final AABBox getBounds() { final AABBox dest = new AABBox(); return dest.copy(bbox).scale2(1.0f/font.getMetrics().getUnitsPerEM(), new float[2]); } @@ -241,7 +241,7 @@ public final class TypecastGlyph implements Font.Glyph { sb.append("Glyph id ").append(id).append(" '").append(glyph_name).append("'") .append(", advance ").append(getAdvanceFU()) .append(", leftSideBearings ").append(getLeftSideBearingsFU()) - .append(", ").append(getBBoxFU()); + .append(", ").append(getBoundsFU()); sb.append("\n Kerning: size ").append(kerning.length).append(", horiz ").append(this.isKerningHorizontal()).append(", cross ").append(this.isKerningCrossstream()); final int left = getID(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java index a9fd32e9d..5e56d1932 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java @@ -114,12 +114,12 @@ final class TypecastHMetrics implements Metrics { } @Override - public final AABBox getBBoxFU(final AABBox dest) { + public final AABBox getBoundsFU(final AABBox dest) { return dest.copy(bbox); } @Override - public AABBox getBBox(final AABBox dest, final float[] tmpV3) { + public AABBox getBounds(final AABBox dest, final float[] tmpV3) { return dest.setSize(bbox.getLow(), bbox.getHigh()).scale2(unitsPerEM_inv, tmpV3); } } |