|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.text.TextFactory
com.threerings.opengl.gui.text.CharacterTextFactory
public class CharacterTextFactory
Formats text by rendering individual characters into a set of shared textures, then returning
Text instances that render groups of quads, one for each character.
| Field Summary |
|---|
| Fields inherited from interface com.threerings.opengl.gui.UIConstants |
|---|
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL |
| Constructor Summary | |
|---|---|
CharacterTextFactory(Font font,
boolean antialias)
Creates a character text factory with the supplied font. |
|
| Method Summary | |
|---|---|
Text |
createText(String text,
Color4f color,
int effect,
int effectSize,
Color4f effectColor,
boolean useAdvance)
Creates a text instance using our the font configuration associated with this text factory and the foreground color, text effect and text effect color specified. |
int |
getHeight()
Returns the height of our text. |
static CharacterTextFactory |
getInstance(Font font,
boolean antialias)
Returns a shared factory instance. |
void |
render(Renderer renderer,
String text,
int x,
int y,
Color4f color)
Renders a string directly, without creating a text object. |
Text[] |
wrapText(String text,
Color4f color,
int effect,
int effectSize,
Color4f effectColor,
int maxWidth)
Wraps a string into a set of text objects that do not exceed the specified width. |
| Methods inherited from class com.threerings.opengl.gui.text.TextFactory |
|---|
createText |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CharacterTextFactory(Font font,
boolean antialias)
| Method Detail |
|---|
public static CharacterTextFactory getInstance(Font font,
boolean antialias)
public void render(Renderer renderer,
String text,
int x,
int y,
Color4f color)
public int getHeight()
TextFactory
getHeight in class TextFactory
public Text createText(String text,
Color4f color,
int effect,
int effectSize,
Color4f effectColor,
boolean useAdvance)
TextFactory
createText in class TextFactoryuseAdvance - if true, the advance to the next insertion point will be included in the
bounds of the created text (this is needed by editable text displays).
public Text[] wrapText(String text,
Color4f color,
int effect,
int effectSize,
Color4f effectColor,
int maxWidth)
TextFactory
wrapText in class TextFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||