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 classAngelCodeFont.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 voiddrawString(float x, float y, java.lang.String text)voiddrawString(float x, float y, java.lang.String text, float r, float g, float b, float a)voiddrawString(float x, float y, java.lang.String text, float r, float g, float b, float a, int startIndex, int endIndex)voiddrawString(float x, float y, java.lang.String text, Color col)voiddrawString(float x, float y, java.lang.String text, Color col, int startIndex, int endIndex)intgetHeight(java.lang.String text)intgetLineHeight()intgetWidth(java.lang.String text)intgetWidth(java.lang.String text, boolean xadvance)intgetYOffset(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:
drawStringin interfaceFont
-
drawString
- Specified by:
drawStringin 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:
drawStringin 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:
getLineHeightin 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)
-