pt.tumba.parser.swf
Class Font.Chars

java.lang.Object
  extended by pt.tumba.parser.swf.Font.Chars
Enclosing class:
Font

public class Font.Chars
extends java.lang.Object

A set of contiguous characters in one font.

Author:
unknown

Field Summary
protected  int[] advances
          Description of the Field
protected  double ascent
          Description of the Field
protected  java.lang.String chars
          Description of the Field
protected  double descent
          Description of the Field
protected  int[] indices
          Description of the Field
protected  double leftMargin
          Description of the Field
protected  double rightMargin
          Description of the Field
protected  double size
          Description of the Field
protected  double totalAdvance
          Description of the Field
 
Constructor Summary
protected Font.Chars(java.lang.String chars, double size)
           
 
Method Summary
 double getAscent()
          Gets the ascent attribute of the Chars object
 double getDescent()
          Gets the descent attribute of the Chars object
 Font getFont()
          Gets the font attribute of the Chars object
 double getLeftMargin()
          The left margin is the difference between the origin of the first glyph and the left edge of its geometry
 double getRightMargin()
          The right margin is the different between the total advance and the right edge of the geometry of the last glyph
 double getSize()
          Gets the size attribute of the Chars object
 double getTotalAdvance()
          Gets the totalAdvance attribute of the Chars object
protected  void init()
          Description of the Method
 java.lang.String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

chars

protected java.lang.String chars
Description of the Field


size

protected double size
Description of the Field


indices

protected int[] indices
Description of the Field


advances

protected int[] advances
Description of the Field


totalAdvance

protected double totalAdvance
Description of the Field


ascent

protected double ascent
Description of the Field


descent

protected double descent
Description of the Field


leftMargin

protected double leftMargin
Description of the Field


rightMargin

protected double rightMargin
Description of the Field

Constructor Detail

Font.Chars

protected Font.Chars(java.lang.String chars,
                     double size)
              throws Font.NoGlyphException
Parameters:
chars - the characters to display (displayable chars only - i.e. no newlines, tabs etc..)
size - point-size - only relevant if font is not null
Throws:
Font.NoGlyphException - Description of the Exception
Method Detail

toString

public java.lang.String toString()
Description of the Method

Overrides:
toString in class java.lang.Object
Returns:
Description of the Return Value

getFont

public Font getFont()
Gets the font attribute of the Chars object

Returns:
The font value

getSize

public double getSize()
Gets the size attribute of the Chars object

Returns:
The size value

getTotalAdvance

public double getTotalAdvance()
Gets the totalAdvance attribute of the Chars object

Returns:
The totalAdvance value

getAscent

public double getAscent()
Gets the ascent attribute of the Chars object

Returns:
The ascent value

getDescent

public double getDescent()
Gets the descent attribute of the Chars object

Returns:
The descent value

getLeftMargin

public double getLeftMargin()
The left margin is the difference between the origin of the first glyph and the left edge of its geometry

Returns:
The leftMargin value

getRightMargin

public double getRightMargin()
The right margin is the different between the total advance and the right edge of the geometry of the last glyph

Returns:
The rightMargin value

init

protected final void init()
                   throws Font.NoGlyphException
Description of the Method

Throws:
Font.NoGlyphException - Description of the Exception