1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SWF::Text - SWF Text class</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:feedback@suse.de" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#notes_">NOTES:</a></li>
<li><a href="#methods">METHODS</a></li>
<li><a href="#author">AUTHOR</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>SWF::Text - SWF Text class</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use SWF::Text;
$text = new SWF::Text();</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Draw simple static texts.</p>
<p>
</p>
<hr />
<h1><a name="notes_">NOTES:</a></h1>
<pre>
None.</pre>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<dl>
<dt><strong><a name="text" class="item">new SWF::Text()</a></strong>
<dd>
<p>Creates a Text object.</p>
</dd>
</li>
<dt><strong><a name="addstring" class="item">$text-><code>addString($string)</code></a></strong>
<dt><strong><a name="addutf8string" class="item">$text->addUTF8String($UTF8string)</a></strong>
<dt><strong><a name="addwidestring" class="item">$text-><code>addWideString($widestring,$widestring_len)</code></a></strong>
<dd>
<p>Writes the given $string into this Text object at the current pen position,
using the current font, height, spacing, and color:</p>
</dd>
<dd>
<pre>
$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);</pre>
</dd>
</li>
<dt><strong><a name="setcolor" class="item">$text->setColor(red, green, blue [, alpha])</a></strong>
<dd>
<p>Set the color of the text. An 8 bit value for each parameter. You can use
he hex or decimal notation. Even mixed.</p>
</dd>
<dd>
<pre>
$text->setColor(0xcc,0,0x33);
$text->setColor(204,0,51,255);</pre>
</dd>
</li>
<dt><strong><a name="setfont" class="item">$text-><code>setFont($font)</code></a></strong>
<dd>
<p>Sets an SWF::Font object -$font- to be used in the Text.</p>
</dd>
</li>
<dt><strong><a name="setheight" class="item">$text-><code>setHeight($height)</code></a></strong>
<dd>
<p>Sets this Text object's current height to given height.</p>
</dd>
</li>
<dt><strong><a name="moveto" class="item">$text->moveTo($x, $y)</a></strong>
<dd>
<p>Move the Text's location to ($x, $y).</p>
</dd>
</li>
<dt><strong><a name="setspacing" class="item">$text-><code>setSpacing($spacing)</code></a></strong>
<dd>
<p>Sets this Text object's current letterspacing to given spacing.</p>
</dd>
</li>
<dt><strong><a name="getwidth" class="item">$text-><code>getWidth($string)</code></a></strong>
<dt><strong><a name="getstringwidth" class="item">$text-><code>getStringWidth($string)</code></a></strong>
<dt><strong><a name="getutf8stringwidth" class="item">$text->getUTF8StringWidth($UTF8string)</a></strong>
<dt><strong><a name="getwidestringwidth" class="item">$text-><code>getWideStringWidth($widestring)</code></a></strong>
<dd>
<p>Returns width of given string in pixels.</p>
</dd>
</li>
<dt><strong><a name="getascent" class="item">$text-><code>getAscent()</code></a></strong>
<dd>
<p>Returns the ascent of the current font at its current size, or 0 if not available.</p>
</dd>
</li>
<dt><strong><a name="getdescent" class="item">$text-><code>getDescent()</code></a></strong>
<dd>
<p>Returns the descent of the current font at its current size, or 0 if not available.</p>
</dd>
</li>
<dt><strong><a name="getleading" class="item">$text-><code>getLeading()</code></a></strong>
<dd>
<p>Returns the leading of the current font at its current size, or 0 if not available.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>developers of ming
ming.sourceforge.net</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>SWF, SWF::Font, SWF::TextField, ISO 10646 (Unicode)</p>
</body>
</html>
|