|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.text.GlyphIndex
public final class GlyphIndex
GlyphIndex is used to display a text character in a span of text. Each GlyphIndex specifies the glyph to be displayed (rather than the character code) along with the distance to the next Character to be displayed, if any.
A single lines of text is displayed using an TextSpan object which
contains a list of Character objects. Blocks of text can be created by
combining one or more TextSpan objects which specify the size, colour and
relative position of each line.
TextSpan| Constructor Summary | |
|---|---|
GlyphIndex(int anIndex,
int anAdvance)
Creates a Character specifying the index of the glyph to be displayed and the spacing to the next glyph. |
|
GlyphIndex(SWFDecoder coder,
Context context)
Creates and initialises a GlyphIndex object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
boolean |
equals(Object other)
|
int |
getAdvance()
Get the spacing in twips between the glyph representing this character and the next. |
int |
getGlyphIndex()
Get the index of the glyph, in a font definition object, that will displayed to represent this character. |
int |
hashCode()
|
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GlyphIndex(SWFDecoder coder,
Context context)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.context - a Context object used to manage the decoders for different
type of object and to pass information on how objects are
decoded.
IOException - if an error occurs while decoding the data.
public GlyphIndex(int anIndex,
int anAdvance)
anIndex - the index into the list of Shapes in a font definition object
that defines the glyph that represents the character to be
displayed.anAdvance - the relative position in twips, from the origin of the glyph
representing this character to the next glyph to be displayed.| Method Detail |
|---|
public int getGlyphIndex()
public int getAdvance()
public String toString()
toString in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder,
Context context)
throws IOException
encode in interface SWFEncodeablecoder - an SWFEncoder object.context - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException - if an error occurs while encoding the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||