public class MapFont
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
MapFont.CharacterSprite
Represents the graphics for a single character in a MapFont.
|
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
malleable |
构造器和说明 |
---|
MapFont() |
限定符和类型 | 方法和说明 |
---|---|
MapFont.CharacterSprite |
getChar(char ch)
Get the sprite for a given character.
|
int |
getHeight()
Get the height of this font.
|
int |
getWidth(java.lang.String text)
Get the width of the given text as it would be rendered using this
font.
|
boolean |
isValid(java.lang.String text)
Check whether the given text is valid.
|
void |
setChar(char ch,
MapFont.CharacterSprite sprite)
Set the sprite for a given character.
|
public void setChar(char ch, MapFont.CharacterSprite sprite)
ch
- The character to set the sprite for.sprite
- The CharacterSprite to set.java.lang.IllegalStateException
- if this font is static.public MapFont.CharacterSprite getChar(char ch)
ch
- The character to get the sprite for.public int getWidth(java.lang.String text)
text
- The text.public int getHeight()
public boolean isValid(java.lang.String text)
text
- The text.