Class AngelCodeFont.CharDef
java.lang.Object
zombie.core.fonts.AngelCodeFont.CharDef
- Enclosing class:
AngelCodeFont
The definition of a single character as defined in the AngelCode file
format
-
Field Summary
FieldsModifier and TypeFieldDescriptionshortThe display list index for this charactershortThe height of the character imageintThe id of the characterThe image containing the charactershort[]short[]The kerning info for this charactershortThe page number for fonts with multiple texturesshortThe width of the character imageshortThe x location on the sprite sheetshortThe amount to move the current position after drawing the charactershortThe amount the x position should be offset when drawing the imageshortThe y location on the sprite sheetshortThe amount the y position should be offset when drawing the image -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddraw(float x, float y) Draw this character embedded in a image drawintgetKerning(int otherCodePoint) get the kerning offset between this character and the specified character.voidinit()Initialise the image by cutting the right section from the map produced by the AngelCode tool.toString()
-
Field Details
-
dlIndex
public short dlIndexThe display list index for this character -
height
public short heightThe height of the character image -
id
public int idThe id of the character -
image
The image containing the character -
kerningSecond
public short[] kerningSecondThe kerning info for this character -
kerningAmount
public short[] kerningAmount -
width
public short widthThe width of the character image -
x
public short xThe x location on the sprite sheet -
xadvance
public short xadvanceThe amount to move the current position after drawing the character -
xoffset
public short xoffsetThe amount the x position should be offset when drawing the image -
y
public short yThe y location on the sprite sheet -
yoffset
public short yoffsetThe amount the y position should be offset when drawing the image -
page
public short pageThe page number for fonts with multiple textures
-
-
Constructor Details
-
CharDef
public CharDef()
-
-
Method Details
-
draw
public void draw(float x, float y) Draw this character embedded in a image draw- Parameters:
x- The x position at which to draw the texty- The y position at which to draw the text
-
getKerning
public int getKerning(int otherCodePoint) get the kerning offset between this character and the specified character.- Parameters:
otherCodePoint- The other code point- Returns:
- the kerning offset
-
init
public void init()Initialise the image by cutting the right section from the map produced by the AngelCode tool. -
destroy
public void destroy() -
toString
-