diff options
Diffstat (limited to 'src/jogl/classes/jogamp/graph')
3 files changed, 8 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index 1bc0fe0f4..cc0aece27 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -250,7 +250,7 @@ class TypecastFont implements Font { @Override public AABBox getMetricBounds(final CharSequence string) { - return getMetricBoundsFU(string).scale2(1.0f/metrics.getUnitsPerEM(), new float[3]); + return getMetricBoundsFU(string).scale2(1.0f/metrics.getUnitsPerEM()); } @Override @@ -290,7 +290,7 @@ class TypecastFont implements Font { } @Override public AABBox getGlyphBounds(final CharSequence string, final AffineTransform tmp1, final AffineTransform tmp2) { - return getGlyphBoundsFU(string, tmp1, tmp2).scale2(1.0f/metrics.getUnitsPerEM(), new float[3]); + return getGlyphBoundsFU(string, tmp1, tmp2).scale2(1.0f/metrics.getUnitsPerEM()); } @Override diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 6747cca82..560d0902b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -148,14 +148,14 @@ public final class TypecastGlyph implements Font.Glyph { public final AABBox getBoundsFU(final AABBox dest) { return dest.copy(bbox); } @Override - public final AABBox getBounds(final AABBox dest, final float[] tmpV3) { - return dest.copy(bbox).scale2(1.0f/font.getMetrics().getUnitsPerEM(), tmpV3); + public final AABBox getBounds(final AABBox dest) { + return dest.copy(bbox).scale2(1.0f/font.getMetrics().getUnitsPerEM()); } @Override public final AABBox getBounds() { - final AABBox dest = new AABBox(); - return dest.copy(bbox).scale2(1.0f/font.getMetrics().getUnitsPerEM(), new float[2]); + final AABBox dest = new AABBox(bbox); + return dest.scale2(1.0f/font.getMetrics().getUnitsPerEM()); } @Override diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java index 5e56d1932..11f1ce7c7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java @@ -119,7 +119,7 @@ final class TypecastHMetrics implements Metrics { } @Override - public AABBox getBounds(final AABBox dest, final float[] tmpV3) { - return dest.setSize(bbox.getLow(), bbox.getHigh()).scale2(unitsPerEM_inv, tmpV3); + public AABBox getBounds(final AABBox dest) { + return dest.copy(bbox).scale2(unitsPerEM_inv); } } |