|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.geom.CharacterCreator
public class CharacterCreator
Representation of font information needed to create polygonal text.
This class serves as a common representation of font information and as a
cache for creating individual character polygonal information for a specific
font. The role of this class is to create a set of polygonal representations
of individual characters, which are then expressed as instances of
CharacterData
. It does not perform any placement of those
characters in any spatial position. That is a requirement of the caller to
perform the correct relative placement of characters.
Characters are generated in the AWT coordinate system. That means that text is invariably drawn upside down in the Y axis. Before using the text, you may need to perform a negative scale about the Y axis.
Note: Because this class works at the individual character level, it doesn't render very well fonts that need to be connected per-character such as arabic etc.
Constructor Summary | |
---|---|
CharacterCreator(java.awt.Font font,
double flatness)
Create a new fontstyle object representing the given font. |
Method Summary | |
---|---|
void |
createCharacterTriangles(char[] characters,
int numChars,
java.util.ArrayList output)
From the provided font, generate the output triangles now. |
double |
getFlatness()
Get the flatness value used to create the internal glyphs. |
java.awt.Font |
getFont()
Get the Java 2D Font used to create this FontStyle object. |
java.awt.font.FontRenderContext |
getFontRenderContext()
Get the Java 2D FontRenderContext used to create this FontStyle object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CharacterCreator(java.awt.Font font, double flatness)
font
- The font object to useflatness
- How closely the points should resemble the defined
outlines for the fontMethod Detail |
---|
public java.awt.Font getFont()
public java.awt.font.FontRenderContext getFontRenderContext()
public double getFlatness()
public void createCharacterTriangles(char[] characters, int numChars, java.util.ArrayList output)
characters
- The string of characters to append to the listnumChars
- The number of valid characters in the arrayoutput
- A place to put each of the character arrays
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |