SWF::Text - SWF Text class

- NAME
- SYNOPSIS
- DESCRIPTION
- NOTES:
- METHODS
- AUTHOR
- SEE ALSO

# NAME

SWF::Text - SWF Text class

# SYNOPSIS

            use SWF::Text;
            $text = new SWF::Text();

# DESCRIPTION

Draw simple static texts.

# NOTES:

        None.

# METHODS

new SWF::Text()

  Creates a Text object.

$text->`addString($string)`
$text->addUTF8String($UTF8string)
$text->`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);

$text->setColor(red, green, blue [, alpha])

  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);

$text->`setFont($font)`

  Sets an SWF::Font object -$font- to be used in the Text.

$text->`setHeight($height)`

  Sets this Text object's current height to given height.

$text->moveTo($x, $y)

  Move the Text's location to ($x, $y).

$text->`setSpacing($spacing)`

  Sets this Text object's current letterspacing to given spacing.

$text->`getWidth($string)`
$text->`getStringWidth($string)`
$text->getUTF8StringWidth($UTF8string)
$text->`getWideStringWidth($widestring)`

  Returns width of given string in pixels.

$text->`getAscent()`

  Returns the ascent of the current font at its current size, or 0 if not available.

$text->`getDescent()`

  Returns the descent of the current font at its current size, or 0 if not available.

$text->`getLeading()`

  Returns the leading of the current font at its current size, or 0 if not available.

# AUTHOR

developers of ming ming.sourceforge.net

# SEE ALSO

SWF, SWF::Font, SWF::TextField, ISO 10646 (Unicode)