Class AngelCodeFont.CharDef

java.lang.Object
zombie.core.fonts.AngelCodeFont.CharDef
Enclosing class:
AngelCodeFont

public class AngelCodeFont.CharDef extends Object
The definition of a single character as defined in the AngelCode file format
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    short
    The display list index for this character
    short
    The height of the character image
    int
    The id of the character
    The image containing the character
    short[]
     
    short[]
    The kerning info for this character
    short
    The page number for fonts with multiple textures
    short
    The width of the character image
    short
    The x location on the sprite sheet
    short
    The amount to move the current position after drawing the character
    short
    The amount the x position should be offset when drawing the image
    short
    The y location on the sprite sheet
    short
    The amount the y position should be offset when drawing the image
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    draw(float x, float y)
    Draw this character embedded in a image draw
    int
    getKerning(int otherCodePoint)
    get the kerning offset between this character and the specified character.
    void
    Initialise the image by cutting the right section from the map produced by the AngelCode tool.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • dlIndex

      public short dlIndex
      The display list index for this character
    • height

      public short height
      The height of the character image
    • id

      public int id
      The id of the character
    • image

      public Texture image
      The image containing the character
    • kerningSecond

      public short[] kerningSecond
      The kerning info for this character
    • kerningAmount

      public short[] kerningAmount
    • width

      public short width
      The width of the character image
    • x

      public short x
      The x location on the sprite sheet
    • xadvance

      public short xadvance
      The amount to move the current position after drawing the character
    • xoffset

      public short xoffset
      The amount the x position should be offset when drawing the image
    • y

      public short y
      The y location on the sprite sheet
    • yoffset

      public short yoffset
      The amount the y position should be offset when drawing the image
    • page

      public short page
      The 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

      public String toString()
      Overrides:
      toString in class Object
      See Also: