|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsk.upjs.fontmapper.FontRenderer
class FontRenderer
Font renderer. Handles rendering of font glyphs to texture pages.
| Field Summary | |
|---|---|
(package private) boolean |
antialiasing_
Is font antialiasing enabled? |
private java.awt.Font |
font_
Font used to draw glyphs. |
(package private) GlyphDataWriter |
writer_
Used for glyph metadata output. |
| Constructor Summary | |
|---|---|
FontRenderer(java.lang.String fontName,
int fontSize,
int fontStyle,
boolean antialiasing,
GlyphDataWriter writer)
Constructs a font renderer with specified font parameters. |
|
| Method Summary | |
|---|---|
char |
drawFont(char min,
char max,
TexturePage page)
Draw specified range of glyphs of this font to specified texture page. |
private java.awt.image.BufferedImage |
glyphImage_(char c,
int colorMode,
TexturePage page)
Return an image with glyph of specified character. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.awt.Font font_
boolean antialiasing_
GlyphDataWriter writer_
| Constructor Detail |
|---|
public FontRenderer(java.lang.String fontName,
int fontSize,
int fontStyle,
boolean antialiasing,
GlyphDataWriter writer)
throws FontNotFoundException
fontName - Name of the font to use.fontSize - Size of the font.fontStyle - Style of the font.antialiasing - Use font antialiasing?writer - GlyphDataWriter used to output glyph metadata.
FontNotFoundException - if the requested font does not exist.| Method Detail |
|---|
public char drawFont(char min,
char max,
TexturePage page)
throws TextureAllocationException
min - Glyph index to start with.max - Glyph index to end at.page - Texture page to draw to.
TextureAllocationException - if font couldn't be drawn due to a glyph larger
than texture page.
The last (max) glyph is not drawn.
private java.awt.image.BufferedImage glyphImage_(char c,
int colorMode,
TexturePage page)
c - Character to draw.colorMode - Color mode of the image to draw to.page - TexturePage to get rendering context from.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||