com.vwp.j3d.utils.image
Class TextTexture
java.lang.Object
com.vwp.j3d.utils.image.TextTexture
public class TextTexture
- extends Object
A TextTexture is a "simple" Texture which contains a text string. This
Texture object is generated dynamically by this class.
|
Method Summary |
javax.media.j3d.Texture2D |
getTexture()
Returns the Texture2D which was generated by this class |
TextTexture
public TextTexture(String text,
Color tcolor,
Color bcolor,
String fontName,
int fontSize,
int fontStyle)
- Constructs a new TextTexture object.
- Parameters:
text - the text which has to be displayed in the texture. Multiple
lines are supported by this class. A line feed has to be defined
simply by a "\n" inside the texttcolor - color of the textbcolor - color of the backgroundfontName - name of the font which has to be used to create the texture.
This name has to be conform to the definitions of the java.awt.FontfontSize - height of the font in pixels. This height influences the
quality and exactness of the text in the created texture.fontStyle - specifies the style of the font (bold, italiy) conform to
the definitions in java.awt.Font
getTexture
public javax.media.j3d.Texture2D getTexture()
- Returns the Texture2D which was generated by this class
- Returns:
- Texture2D object which shows the desired text