com.jmex.font2d
Class Font2D
java.lang.Object
com.jmex.font2d.Font2D
- All Implemented Interfaces:
- TextFactory
public class Font2D
- extends java.lang.Object
- implements TextFactory
Constructor Summary |
Font2D()
|
Font2D(java.lang.String fontBitmapFile)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Font2D
public Font2D()
Font2D
public Font2D(java.lang.String fontBitmapFile)
getFontTextureState
public static TextureState getFontTextureState(java.lang.String fontFile)
- Creates the texture state if not created before.
- Returns:
- texture state for the default font
getFontTextureState
public TextureState getFontTextureState()
- Returns:
- the texture state used by this font.
getFontBitmapFile
public java.lang.String getFontBitmapFile()
- Returns:
- the bitmap used by this fonts texture state.
createText
public Text2D createText(java.lang.String text,
float size,
int flags)
- Description copied from interface:
TextFactory
- Method for creating new Text-objects.
- Specified by:
createText
in interface TextFactory
- Parameters:
text
- the text that should be visualized.size
- the size of the text generated.flags
- Can be Font.BOLD, Font.ITALIC, Font.PLAIN
- Returns:
- the new text object.
clearCachedFontTextureStates
public static void clearCachedFontTextureStates()