|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hermetica.magician.fonts.GLTextureFont
This class should be subclassed to provide class-based portable fonts that can be used in Magician.
Field Summary | |
static java.lang.String |
VERSION
Version information |
Constructor Summary | |
GLTextureFont()
|
Method Summary | |
void |
bindTexture()
Binds the font texture |
void |
drawCharacter(byte charToDraw)
Draws a character in the current font |
void |
drawCharacter(char charToDraw)
Draws a character in the current font |
void |
drawCharacter(int charToDraw)
Draws a character in the current font |
void |
drawString(byte[] stringToDraw)
Draws the specified string in the current font |
void |
drawString(char[] stringToDraw)
Draws the specified string in the current font |
void |
drawString(java.lang.String stringToDraw)
Draws the specified string in the current font |
int |
getCharacterHeight(char character)
Returns the height of the specified character |
int |
getCharacterWidth(char character)
Returns the width of the specified character |
GLTextureChar |
getCharData(char character)
Returns the data for the given character in the font |
int |
getFirstChar()
Returns the first character index in the font |
GLTextureChar[] |
getFontData()
Returns the font data for this font |
GLTextureCharInfo[] |
getFontInfo()
Returns the font info for this font |
int |
getMaxAscent()
Returns the max ascent of the font |
int |
getMaxDescent()
Returns the max descent of the font |
java.lang.String |
getName()
Returns the name of the font |
int |
getNumChars()
Returns the number of characters in the font |
byte[] |
getTexture()
Returns the texture for this font |
int |
getTextureHeight()
Returns the texture height |
int |
getTextureWidth()
Returns the texture width |
void |
initializeTexture(boolean useMipmaps)
Initializes the texture objects after the font data is created |
void |
setFirstChar(int firstChar)
Sets the first character in the font |
void |
setFontData(GLTextureChar[] fontData)
Sets the font data at the given index |
void |
setFontInfo(GLTextureCharInfo[] info)
Sets the font info for this font |
void |
setMaxAscent(int ascent)
Sets the max ascent of the font |
void |
setMaxDescent(int descent)
Sets the max descent of the font |
void |
setName(java.lang.String name)
Sets the name of the font |
void |
setNumChars(int numChars)
Sets the number of characters in the font |
void |
setTexture(byte[] texture)
Sets the texture for this font |
void |
setTextureHeight(int height)
Sets the texture height |
void |
setTextureWidth(int width)
Sets the texture width |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String VERSION
Constructor Detail |
public GLTextureFont()
Method Detail |
public final java.lang.String getName()
public final void setName(java.lang.String name)
public final GLTextureChar[] getFontData()
public final void setFontData(GLTextureChar[] fontData)
public final int getNumChars()
public final void setNumChars(int numChars)
public final int getFirstChar()
public final void setFirstChar(int firstChar)
public final int getCharacterWidth(char character)
public final int getCharacterHeight(char character)
public final void setFontInfo(GLTextureCharInfo[] info)
public final GLTextureCharInfo[] getFontInfo()
public final void setTexture(byte[] texture)
public final byte[] getTexture()
public final void setTextureWidth(int width)
public final int getTextureWidth()
public final void setTextureHeight(int height)
public final int getTextureHeight()
public void setMaxAscent(int ascent)
public int getMaxAscent()
public void setMaxDescent(int descent)
public int getMaxDescent()
public void initializeTexture(boolean useMipmaps)
public void bindTexture()
public final void drawCharacter(byte charToDraw)
charToDraw
- The character in the font to drawpublic final void drawCharacter(int charToDraw)
charToDraw
- The character in the font to drawpublic void drawCharacter(char charToDraw)
charToDraw
- The character in the font to drawpublic final void drawString(java.lang.String stringToDraw)
stringToDraw
- The string to drawpublic final void drawString(char[] stringToDraw)
stringToDraw
- The string to drawpublic final void drawString(byte[] stringToDraw)
stringToDraw
- The string to drawpublic final GLTextureChar getCharData(char character)
character
- The character to fetch the bitmap data for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |