pt.tumba.parser.swf
Class Text

java.lang.Object
  extended by pt.tumba.parser.swf.Symbol
      extended by pt.tumba.parser.swf.Text

public class Text
extends Symbol

A Text Symbol.

Author:
unknown

Nested Class Summary
static class Text.Row
          A set of contiguous characters in one font, size and color.
 
Field Summary
protected  boolean hasAlpha
          Description of the Field
protected  Transform matrix
          Description of the Field
protected  java.util.List rows
          Description of the Field
 
Fields inherited from class pt.tumba.parser.swf.Symbol
id
 
Constructor Summary
Text(Transform matrix)
          Create a Text Symbol which is transformed by the given matrix
 
Method Summary
protected  int defineSymbol(Movie movie, SWFTagTypes timelineWriter, SWFTagTypes definitionWriter)
          Description of the Method
 java.util.List getRows()
          Access the list of Row instances.
 Transform getTransform()
          Get the transformation matrix applied to the text
 Text.Row row(Font.Chars chars, Color color, double x, double y, boolean hasX, boolean hasY)
          Add a contiguous set of characters that have the same font, size, color and vertical position.
 void setTransform(Transform matrix)
          Sets the transform attribute of the Text object
 
Methods inherited from class pt.tumba.parser.swf.Symbol
define, getId, getNextId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasAlpha

protected boolean hasAlpha
Description of the Field


matrix

protected Transform matrix
Description of the Field


rows

protected java.util.List rows
Description of the Field

Constructor Detail

Text

public Text(Transform matrix)
Create a Text Symbol which is transformed by the given matrix

Parameters:
matrix - if null then an identity transform is assumed
Method Detail

getRows

public java.util.List getRows()
Access the list of Row instances.

Returns:
The rows value

getTransform

public Transform getTransform()
Get the transformation matrix applied to the text

Returns:
The transform value

setTransform

public void setTransform(Transform matrix)
Sets the transform attribute of the Text object

Parameters:
matrix - The new transform value

row

public Text.Row row(Font.Chars chars,
                    Color color,
                    double x,
                    double y,
                    boolean hasX,
                    boolean hasY)
Add a contiguous set of characters that have the same font, size, color and vertical position.

Parameters:
chars - the characters to display)
x - new X position for text - only valid if hasX is true
y - new Y position for text - only valid if hasY is true
color - Description of the Parameter
hasX - Description of the Parameter
hasY - Description of the Parameter
Returns:
the new X position after writing the chars

defineSymbol

protected int defineSymbol(Movie movie,
                           SWFTagTypes timelineWriter,
                           SWFTagTypes definitionWriter)
                    throws java.io.IOException
Description of the Method

Specified by:
defineSymbol in class Symbol
Parameters:
movie - Description of the Parameter
timelineWriter - Description of the Parameter
definitionWriter - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.io.IOException - Description of the Exception