com.vwp.j3d.utils.image
Class TextTexture

java.lang.Object
  extended by 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.


Constructor Summary
TextTexture(String text, Color tcolor, Color bcolor, String fontName, int fontSize, int fontStyle)
          Constructs a new TextTexture object.
 
Method Summary
 javax.media.j3d.Texture2D getTexture()
          Returns the Texture2D which was generated by this class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 text
tcolor - color of the text
bcolor - color of the background
fontName - 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.Font
fontSize - 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
Method Detail

getTexture

public javax.media.j3d.Texture2D getTexture()
Returns the Texture2D which was generated by this class

Returns:
Texture2D object which shows the desired text