|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsk.upjs.fontmapper.GlyphDataWriter
abstract class GlyphDataWriter
Base class for classes handling glyph data output.
| Nested Class Summary | |
|---|---|
protected class |
GlyphDataWriter.GlyphData
Stores output data for single glyph. |
| Field Summary | |
|---|---|
protected boolean |
antialiasing_
Antialiasing mode. |
protected GlyphDataWriter.GlyphData |
currentGlyph_
GlyphData that is currently written to. |
protected java.lang.String |
fontName_
Name of the font. |
protected int |
fontSize_
Point size of the font. |
protected int |
fontStyle_
Style of the font (e.g. |
protected java.util.ArrayList<java.util.ArrayList<GlyphDataWriter.GlyphData>> |
glyphs_
GlyphData of all glyphs in all pages. |
protected int |
numGlyphs_
Number of glyphs. |
protected int |
numPages_
Number of texture pages. |
protected int |
pageFormat_
Color format of texture pages. |
protected java.util.ArrayList<java.lang.String> |
pageNames_
File names of texture pages. |
protected java.awt.Dimension |
pageSize_
Size of texture pages in pixels. |
protected int |
startGlyph_
First glyph drawn. |
| Constructor Summary | |
|---|---|
GlyphDataWriter()
Constructor. |
|
| Method Summary | |
|---|---|
void |
fontData(java.lang.String fontName,
int fontSize,
int fontStyle,
boolean antialiasing)
Set font metadata to output. |
void |
glyphData(int startGlyph,
int numGlyphs)
Set metadata about all glyphs to output. |
void |
glyphFinish()
Finish adding a glyph. |
void |
glyphMetrics(java.awt.Point offset,
int advance,
java.awt.Dimension size)
Set glyph metrics of the glyph currently being added. |
void |
glyphTexCoords(java.awt.geom.Rectangle2D.Float texcoords)
Set texture coordinates of the glyph currently being added. |
void |
pageData(int numPages,
java.awt.Dimension pageSize,
int pageFormat)
Set font texture page metadata to output. |
void |
pageFinish(java.lang.String name)
Finish a texture page and set its filename. |
abstract void |
write(java.lang.String fileName)
Write out to specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String fontName_
protected int fontSize_
protected int fontStyle_
protected boolean antialiasing_
protected int startGlyph_
protected int numGlyphs_
protected int numPages_
protected java.awt.Dimension pageSize_
protected int pageFormat_
protected java.util.ArrayList<java.lang.String> pageNames_
protected GlyphDataWriter.GlyphData currentGlyph_
protected java.util.ArrayList<java.util.ArrayList<GlyphDataWriter.GlyphData>> glyphs_
| Constructor Detail |
|---|
public GlyphDataWriter()
| Method Detail |
|---|
public abstract void write(java.lang.String fileName)
throws GlyphDataOutputException
GlyphDataOutputException - on failure.
public void fontData(java.lang.String fontName,
int fontSize,
int fontStyle,
boolean antialiasing)
fontName - Name of the font rendered.fontSize - Point size of the font.fontStyle - Style of the font (e.g. bold or italic).antialiasing - Antialiasing mode of the font.
public void glyphData(int startGlyph,
int numGlyphs)
startGlyph - First (unicode) glyph drawn.numGlyphs - Number of glyphs drawn.
public void pageData(int numPages,
java.awt.Dimension pageSize,
int pageFormat)
numPages - Number of texture pages.pageSize - Size of texture pages in pixels.pageFormat - Color format of texture pages.public void pageFinish(java.lang.String name)
name - Page filename.
public void glyphMetrics(java.awt.Point offset,
int advance,
java.awt.Dimension size)
offset - Offset from the pen to the bottom-left corner of the glyph.advance - Pixels to move the pen after drawing the glyph.size - Size of the glyph in pixels.public void glyphTexCoords(java.awt.geom.Rectangle2D.Float texcoords)
texcoords - Rectangle specifying texcoords of the glyph.public void glyphFinish()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||