scenic
Class TextShape

java.lang.Object
  extended by scenic.SceneNode
      extended by scenic.SceneLeaf
          extended by scenic.Shape
              extended by scenic.TextShape

public class TextShape
extends Shape

This shape draws text. The text is specified using glyph codes. The positions of the glyphs are given as an array that contains the x and y coordinates of each glyph.


Constructor Summary
TextShape(java.awt.Font font, int[] glyphCodes, float[] positions)
          Constructs a TextShape object with the given parameters.
 
Method Summary
 java.awt.Font getFont()
          Gets the font.
 int[] getGlyphCodes()
          Gets the glyph codes.
 float[] getPositions()
          Gets the glyph positions.
 void setFont(java.awt.Font font)
          Sets the font.
 void setGlyphs(int[] glyphCodes, float[] positions)
          Sets the glyph codes and positions.
 
Methods inherited from class scenic.Shape
getColor, setColor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextShape

public TextShape(java.awt.Font font,
                 int[] glyphCodes,
                 float[] positions)
Constructs a TextShape object with the given parameters.

Parameters:
font - the font.
glyphCodes - an array of glyph codes.
positions - an array containing the x and y coordinates of each glyph.
Method Detail

getFont

public java.awt.Font getFont()
Gets the font.


setFont

public void setFont(java.awt.Font font)
Sets the font.


getGlyphCodes

public int[] getGlyphCodes()
Gets the glyph codes.


getPositions

public float[] getPositions()
Gets the glyph positions.


setGlyphs

public void setGlyphs(int[] glyphCodes,
                      float[] positions)
Sets the glyph codes and positions.

Parameters:
glyphCodes - an array of glyph codes.
positions - an array containing the x and y coordinates of each glyph.