diff options
author | Sven Göthel <[email protected]> | 2024-02-04 07:33:21 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-04 07:33:21 +0100 |
commit | 6caed46dba2c8be34c3cb32dc6bddf31f98eac02 (patch) | |
tree | c9804afdb6d0f31acd5b116e5fc886e06b0a8c8f /src/test/com/jogamp/opengl | |
parent | 8fcbeaa4e440e1bb8e51658f15a35d2a217dc0bc (diff) |
Use new com.jogamp.common.util.StringUtil (GlueGen)
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java index a248dd810..6b5e09877 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java @@ -32,6 +32,7 @@ import java.io.IOException; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLEventListener; +import com.jogamp.common.util.StringUtil; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RenderState; import com.jogamp.graph.curve.opengl.RegionRenderer; @@ -222,7 +223,7 @@ public abstract class TextRendererGLELBase implements GLEventListener { } private void renderStringImpl(final GLAutoDrawable drawable, - final Font font, final float pixelSize, final String text, + final Font font, final float pixelSize, final CharSequence text, final int column, final int row, final float tx, final float ty, final float tz, final boolean cacheRegion, final GLRegion region) { if( null != renderer ) { @@ -238,7 +239,7 @@ public abstract class TextRendererGLELBase implements GLEventListener { dy = height-ty; } final float sxy = pixelScale * pixelSize; - final int newLineCount = TextRegionUtil.getCharCount(text, '\n'); + final int newLineCount = StringUtil.getLineCount(text); final float lineHeight = font.getLineHeight(); dx += sxy * font.getAdvanceWidth( font.getGlyphID( 'X' ) ) * column; dy -= sxy * lineHeight * ( row + 1 ); |