public interface BitmapFontRenderer
| Modifier and Type | Method and Description |
|---|---|
void |
afterRender()
This is called after several render() calls.
|
void |
beforeRender()
This is called before several render() calls are happening.
|
void |
prepare()
This is called after all registerBitmap() and registerGlyph() calls are done.
|
int |
preProcess(String text,
int offset)
This allows any pre-processing of the next characters to happen.
|
int |
preProcessForLength(String text,
int offset)
This allows any pre-processing of the next characters to happen when the width of a text is to be calculated.
|
void |
registerBitmap(String key,
InputStream data,
String filename)
Register the bitmap with the given data under the given key.
|
void |
registerGlyph(String bitmapId,
char c,
int xoff,
int yoff,
int w,
int h,
float u0,
float v0,
float u1,
float v1)
Register a single Character Glyph for later rendering.
|
void |
render(String bitmapId,
int x,
int y,
char c,
float sx,
float sy,
float r,
float g,
float b,
float a)
Render a single character at the given position with the given color using the given bitmapId.
|
void registerBitmap(String key, InputStream data, String filename) throws IOException
key - the key for this specific bitmapdata - the inputstream to the dataIOExceptionvoid registerGlyph(String bitmapId, char c, int xoff, int yoff, int w, int h, float u0, float v0, float u1, float v1)
c - the characterxoff - xoffset in the bitmapyoff - yoffset in the bitmapw - the width of the glyphh - the height of the glyphu0 - the x texture coordinates of the upper left pointv0 - the y texture coordinates of the upper left pointu1 - the x texture coordinates of the bottom right pointv1 - the y texture coordinates of the bottom right pointvoid prepare()
void beforeRender()
int preProcess(String text, int offset)
text - the complete text to renderoffset - the offset where the next characters will get renderedvoid render(String bitmapId, int x, int y, char c, float sx, float sy, float r, float g, float b, float a)
bitmapId - the bitmapId the corresponding character is onx - the x positiony - the y positionc - the character to outputsx - x scale factorsy - y scale factorr - redg - greenb - bluea - alphavoid afterRender()
int preProcessForLength(String text, int offset)
text - the complete text to renderoffset - the offset where the next characters will get renderedCopyright © 2013. All Rights Reserved.