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)
FontGlyphLayout
setText
in interface FontGlyphLayout
str
- The text to compute the geometry forpublic void setText(java.lang.CharSequence str, Color color, float targetWidth, int halign, boolean wrap)
FontGlyphLayout
setText
in interface FontGlyphLayout
str
- The text to compute the geometry forcolor
- The Color
of the texthalign
- The alignment based on Align
public int calculateMaxCharactersBeforeWrap(java.lang.CharSequence str, int from, int estimate, float targetWidth)
str
- from
- public void reset()
FontGlyphLayout
reset
in interface FontGlyphLayout
public void dispose()
FontGlyphLayout
dispose
in interface FontGlyphLayout
public float getWidth()
FontGlyphLayout
getWidth
in interface FontGlyphLayout
public float getHeight()
FontGlyphLayout
getHeight
in interface FontGlyphLayout
public GameFont getFont()
FontGlyphLayout
GameFont
that this FontGlyphLayout
was created fromgetFont
in interface FontGlyphLayout
public void transferGlyphsTo(org.mini2Dx.gdx.utils.Array<MonospaceGlyph> result, float x, float y)
public org.mini2Dx.gdx.utils.Array<MonospaceGlyph> getGlyphs()