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 TypeFieldDescriptionshort
The display list index for this charactershort
The height of the character imageint
The id of the characterThe image containing the charactershort[]
short[]
The kerning info for this charactershort
The page number for fonts with multiple texturesshort
The width of the character imageshort
The x location on the sprite sheetshort
The amount to move the current position after drawing the charactershort
The amount the x position should be offset when drawing the imageshort
The y location on the sprite sheetshort
The amount the y position should be offset when drawing the image -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
draw
(float _x, float _y) Draw this character embedded in a image drawint
getKerning
(int otherCodePoint) get the kerning offset between this character and the specified character.void
init()
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 text_y
- 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
-