From 8fbb5bb2f4312b52c24375db3055198a18d66319 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 7 Mar 2023 05:25:07 +0100 Subject: Graph: Bring back passing through temp AffineTransform instances (optional, but recommended) --- .../classes/jogamp/graph/font/typecast/TypecastFont.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/jogamp/graph') diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index aba7d6807..d2137ae36 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -291,17 +291,22 @@ class TypecastFont implements Font { @Override public AABBox getGlyphBounds(final CharSequence string) { - return getGlyphBoundsFU(string).scale2(1.0f/metrics.getUnitsPerEM(), new float[3]); + return getGlyphBounds(string, new AffineTransform(), new AffineTransform()); + } + @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]); } @Override public AABBox getGlyphBoundsFU(final CharSequence string) { + return getGlyphBoundsFU(string, new AffineTransform(), new AffineTransform()); + } + @Override + public AABBox getGlyphBoundsFU(final CharSequence string, final AffineTransform temp1, final AffineTransform temp2) { if (null == string || 0 == string.length() ) { return new AABBox(); } - final AffineTransform temp1 = new AffineTransform(); - final AffineTransform temp2 = new AffineTransform(); - final AABBox res = new AABBox(); final int charCount = string.length(); -- cgit v1.2.3