public class MapFont extends 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(String text)
Get the width of the given text as it would be rendered using this
font.
|
boolean |
isValid(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.IllegalStateException
- if this font is static.public MapFont.CharacterSprite getChar(char ch)
ch
- The character to get the sprite for.public int getWidth(String text)
text
- The text.public int getHeight()
public boolean isValid(String text)
text
- The text.Copyright © 2016. All rights reserved.