com.jmex.bui.text
Class JMEBitmapTextFactory
java.lang.Object
com.jmex.bui.text.BTextFactory
com.jmex.bui.text.JMEBitmapTextFactory
- All Implemented Interfaces:
- BConstants
public class JMEBitmapTextFactory
- extends BTextFactory
Creates instances of BText for text rendering.
|
Field Summary |
protected com.jme.scene.state.BlendState |
_astate
|
protected int |
_height
|
protected com.jme.scene.state.TextureState |
_tstate
|
protected int |
_width
|
|
Constructor Summary |
JMEBitmapTextFactory(com.jme.image.Texture font)
|
JMEBitmapTextFactory(java.net.URL font)
Creates a bitmap text factory with the specified font URL and the supplied per-character width and height. |
|
Method Summary |
BText |
createText(java.lang.String text,
com.jme.renderer.ColorRGBA color,
TextEffect effect,
int effectSize,
com.jme.renderer.ColorRGBA 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. |
BText[] |
wrapText(java.lang.String text,
com.jme.renderer.ColorRGBA color,
TextEffect effect,
int effectSize,
com.jme.renderer.ColorRGBA effectColor,
int maxWidth)
Wraps a string into a set of text objects that do not exceed the
specified width. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_width
protected int _width
_height
protected int _height
_tstate
protected com.jme.scene.state.TextureState _tstate
_astate
protected com.jme.scene.state.BlendState _astate
JMEBitmapTextFactory
public JMEBitmapTextFactory(java.net.URL font)
- Creates a bitmap text factory with the specified font URL and the supplied per-character width and height.
JMEBitmapTextFactory
public JMEBitmapTextFactory(com.jme.image.Texture font)
getHeight
public int getHeight()
- Description copied from class:
BTextFactory
- Returns the height of our text.
- Specified by:
getHeight in class BTextFactory
createText
public BText createText(java.lang.String text,
com.jme.renderer.ColorRGBA color,
TextEffect effect,
int effectSize,
com.jme.renderer.ColorRGBA effectColor,
boolean useAdvance)
- Description copied from class:
BTextFactory
- 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.
- Specified by:
createText in class BTextFactory
useAdvance - if true, the advance to the next insertion point will be included in the
wrapText
public BText[] wrapText(java.lang.String text,
com.jme.renderer.ColorRGBA color,
TextEffect effect,
int effectSize,
com.jme.renderer.ColorRGBA effectColor,
int maxWidth)
- Description copied from class:
BTextFactory
- Wraps a string into a set of text objects that do not exceed the
specified width.
- Specified by:
wrapText in class BTextFactory
Copyright © 2011 Michael Bayne.
All Rights Reserved.