Package zombie.core.fonts
Class AngelCodeFont
java.lang.Object
zombie.core.fonts.AngelCodeFont
- All Implemented Interfaces:
Font
public class AngelCodeFont extends java.lang.Object implements Font
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AngelCodeFont.CharDef
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AngelCodeFont(java.lang.String fntFile, java.lang.String imgFile)
AngelCodeFont(java.lang.String fntFile, Texture image)
-
Method Summary
Modifier and Type Method Description void
drawString(float x, float y, java.lang.String text)
void
drawString(float x, float y, java.lang.String text, float r, float g, float b, float a)
void
drawString(float x, float y, java.lang.String text, float r, float g, float b, float a, int startIndex, int endIndex)
void
drawString(float x, float y, java.lang.String text, Color col)
void
drawString(float x, float y, java.lang.String text, Color col, int startIndex, int endIndex)
int
getHeight(java.lang.String text)
int
getLineHeight()
int
getWidth(java.lang.String text)
int
getWidth(java.lang.String text, boolean xadvance)
int
getYOffset(java.lang.String text)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
chars
-
zoom
public float zoom -
xoff
public int xoff -
yoff
public int yoff -
curCol
-
curR
public static float curR -
curG
public static float curG -
curB
public static float curB -
curA
public static float curA
-
-
Constructor Details
-
AngelCodeFont
- Throws:
java.io.FileNotFoundException
-
AngelCodeFont
public AngelCodeFont(java.lang.String fntFile, java.lang.String imgFile) throws java.io.FileNotFoundException- Throws:
java.io.FileNotFoundException
-
-
Method Details
-
drawString
public void drawString(float x, float y, java.lang.String text)- Specified by:
drawString
in interfaceFont
-
drawString
- Specified by:
drawString
in interfaceFont
-
drawString
public void drawString(float x, float y, java.lang.String text, float r, float g, float b, float a) -
drawString
public void drawString(float x, float y, java.lang.String text, Color col, int startIndex, int endIndex)- Specified by:
drawString
in interfaceFont
-
drawString
public void drawString(float x, float y, java.lang.String text, float r, float g, float b, float a, int startIndex, int endIndex) -
getHeight
public int getHeight(java.lang.String text) -
getLineHeight
public int getLineHeight()- Specified by:
getLineHeight
in interfaceFont
-
getWidth
public int getWidth(java.lang.String text) -
getWidth
public int getWidth(java.lang.String text, boolean xadvance) -
getYOffset
public int getYOffset(java.lang.String text)
-