|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.font.FontAlignment
public final class FontAlignment
FontAlignment provides the alignment information for the glyphs in a font.
| Nested Class Summary | |
|---|---|
static class |
FontAlignment.StrokeWidth
StrokeWidth is used to provide hints about the thickness of the line used for rendering glyphs in a font. |
| Constructor Summary | |
|---|---|
FontAlignment(FontAlignment object)
Creates and initialises a FontAlignment object using the values copied from another FontAlignment object. |
|
FontAlignment(int uid,
FontAlignment.StrokeWidth stroke,
List<GlyphAlignment> list)
Creates a new FontAlignment object for the referenced font along with information on the stroke width used to draw the glyphs and a list of alignment zones for each glyph. |
|
FontAlignment(SWFDecoder coder)
Creates and initialises a FontAlignment object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
FontAlignment |
addZone(GlyphAlignment zone)
Add the alignment information for a glyph to the list. |
FontAlignment |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
int |
getIdentifier()
Get the unique identifier of the font definition that the alignment information is for. |
FontAlignment.StrokeWidth |
getStrokeWidth()
Get the StrokeWidth that describes how the glyphs in the font are typically drawn. |
List<GlyphAlignment> |
getZones()
Get the alignment information for each glyph in the font. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setIdentifier(int uid)
Sets the identifier of the font that this alignment information is for. |
void |
setStrokeWidth(FontAlignment.StrokeWidth stroke)
Set the StrokeWidth that describes how the glyphs in the font are typically drawn. |
void |
setZones(List<GlyphAlignment> list)
Set the alignment information for each glyph in the font. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FontAlignment(SWFDecoder coder)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.
IOException - if an error occurs while decoding the data.
public FontAlignment(int uid,
FontAlignment.StrokeWidth stroke,
List<GlyphAlignment> list)
uid - the unique identifier of the font.stroke - the typical width used when drawing the glyphs.list - a list of alignment boxes used for rendering the glyphs.public FontAlignment(FontAlignment object)
object - a FontAlignment object from which the values will be
copied.| Method Detail |
|---|
public int getIdentifier()
public void setIdentifier(int uid)
uid - the unique identifier of the DefineFont that contains the
glyphs for the font. Must be in the range 1..65535.public FontAlignment.StrokeWidth getStrokeWidth()
public void setStrokeWidth(FontAlignment.StrokeWidth stroke)
stroke - a StrokeWidth defining how the font is drawn.public List<GlyphAlignment> getZones()
public void setZones(List<GlyphAlignment> list)
list - a list of GlyphAliment objects that describe the areas in
each glyph which can be snapped to the nearest pixel to improve display
quality.public FontAlignment addZone(GlyphAlignment zone)
zone - the alignment information for a glyph.
public FontAlignment copy()
copy in interface Copyable<MovieTag>public String toString()
toString 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 | |||||||||