SWF::Text - SWF Text class
use SWF::Text; $text = new SWF::Text();
Draw simple static texts.
None.
Creates a Text object.
addString($string)
addWideString($widestring,$widestring_len)
Writes the given $string into this Text object at the current pen position, using the current font, height, spacing, and color:
$t->addString("Thai"); $t->addUTF8String("\x{0E44}\x{0E17}\x{0E22}"); $t->addWideString("\x{44}\x{0E}\x{17}\x{0E}\x{22}\x{0E}",3);
Set the color of the text. An 8 bit value for each parameter. You can use he hex or decimal notation. Even mixed.
$text->setColor(0xcc,0,0x33); $text->setColor(204,0,51,255);
setFont($font)
Sets an SWF::Font object -$font- to be used in the Text.
setHeight($height)
Sets this Text object's current height to given height.
Move the Text's location to ($x, $y).
setSpacing($spacing)
Sets this Text object's current letterspacing to given spacing.
getWidth($string)
getStringWidth($string)
getWideStringWidth($widestring)
Returns width of given string in pixels.
getAscent()
Returns the ascent of the current font at its current size, or 0 if not available.
getDescent()
Returns the descent of the current font at its current size, or 0 if not available.
getLeading()
Returns the leading of the current font at its current size, or 0 if not available.
developers of ming ming.sourceforge.net
SWF, SWF::Font, SWF::TextField, ISO 10646 (Unicode)