summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java2
-rw-r--r--src/jogl/classes/com/jogamp/graph/font/Font.java12
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java2
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java10
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java4
6 files changed, 17 insertions, 17 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
index 5d380b396..77c644493 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
@@ -322,7 +322,7 @@ public class UITypeDemo01 implements GLEventListener {
glyph = null;
}
if( null != glyph && glyph.getID() != Glyph.ID_UNKNOWN ) {
- final AABBox txt_box_em = glyph.getBBox();
+ final AABBox txt_box_em = glyph.getBounds();
final float full_width_s = full_width_o / txt_box_em.getWidth();
final float full_height_s = full_height_o / txt_box_em.getHeight();
final float txt_scale = full_width_s < full_height_s ? full_width_s/2f : full_height_s/2f;
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);
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java
index 5b254d46d..25af3d910 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java
@@ -101,8 +101,8 @@ public class TestFontsNEWT00 extends UITestCase {
System.err.println(" em "+s0_em+", "+s1_em);
System.err.println(" px "+s0_px+", "+s1_px);
System.err.println(" AABBox");
- System.err.println(" funits "+glyph.getBBoxFU());
- System.err.println(" em "+glyph.getBBox(new AABBox(), new float[3]));
+ System.err.println(" funits "+glyph.getBoundsFU());
+ System.err.println(" em "+glyph.getBounds(new AABBox(), new float[3]));
Assert.assertEquals(s0, s1);