public class MonospaceFontGlyphLayout extends java.lang.Object implements FontGlyphLayout
| Constructor and Description |
|---|
MonospaceFontGlyphLayout(MonospaceGameFont monospaceFont) |
| Modifier and Type | Method and Description |
|---|---|
int |
calculateMaxCharactersBeforeWrap(java.lang.CharSequence str,
int from,
int estimate,
float targetWidth) |
void |
dispose()
Disposes of this instance
|
GameFont |
getFont()
Returns the
GameFont that this FontGlyphLayout was created from |
org.mini2Dx.gdx.utils.Array<MonospaceGlyph> |
getGlyphs() |
float |
getHeight()
Returns the total height of the text
|
float |
getWidth()
Returns the total width of the text
|
void |
reset()
Resets this instance
|
void |
setText(java.lang.CharSequence str)
Sets the text to compute the geometry for
|
void |
setText(java.lang.CharSequence str,
Color color,
float targetWidth,
int halign,
boolean wrap)
Sets the text to compute the geometry for
|
void |
transferGlyphsTo(org.mini2Dx.gdx.utils.Array<MonospaceGlyph> result,
float x,
float y) |
public MonospaceFontGlyphLayout(MonospaceGameFont monospaceFont)
public void setText(java.lang.CharSequence str)
FontGlyphLayoutsetText in interface FontGlyphLayoutstr - The text to compute the geometry forpublic void setText(java.lang.CharSequence str,
Color color,
float targetWidth,
int halign,
boolean wrap)
FontGlyphLayoutsetText in interface FontGlyphLayoutstr - The text to compute the geometry forcolor - The Color of the texthalign - The alignment based on Alignpublic int calculateMaxCharactersBeforeWrap(java.lang.CharSequence str,
int from,
int estimate,
float targetWidth)
str - from - public void reset()
FontGlyphLayoutreset in interface FontGlyphLayoutpublic void dispose()
FontGlyphLayoutdispose in interface FontGlyphLayoutpublic float getWidth()
FontGlyphLayoutgetWidth in interface FontGlyphLayoutpublic float getHeight()
FontGlyphLayoutgetHeight in interface FontGlyphLayoutpublic GameFont getFont()
FontGlyphLayoutGameFont that this FontGlyphLayout was created fromgetFont in interface FontGlyphLayoutpublic void transferGlyphsTo(org.mini2Dx.gdx.utils.Array<MonospaceGlyph> result, float x, float y)
public org.mini2Dx.gdx.utils.Array<MonospaceGlyph> getGlyphs()