📄 function.swftext.construct.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Creates a new SWFText object</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.swftext.addutf8string.html">SWFText->addUTF8String</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.swftext.getascent.html">SWFText->getAscent</a></div> <div class="up"><a href="class.swftext.html">SWFText</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.swftext.construct" class="refentry"> <div class="refnamediv"> <h1 class="refname">SWFText->__construct</h1> <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">SWFText->__construct</span> — <span class="dc-title">Creates a new SWFText object</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="classsynopsis"> <div class="ooclass"><a href="class.swftext.html" class="classname">SWFText</a></div> <div class="methodsynopsis dc-description"> <span class="type">void</span> <span class="methodname"><b><b>__construct</b></b></span> ( <span class="methodparam">void</span> )</div> </div> <div class="warning"><b class="warning">Warning</b><p class="simpara">This function is<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, andsurrounding documentation may change without notice in a future release of PHP.This function should be used at your own risk.</p></div> <p class="para"> Creates a new <a href="class.swftext.html" class="classname">SWFText</a> object, fresh for manipulating. </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> This simple example will draw a big yellow "PHP generates Flash with Ming" text, on white background. <div class="example"> <p><b>Example #1 <b>swftext()</b> example</b></p> <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br />$f </span><span style="color: #007700">= new </span><span style="color: #0000BB">SWFFont</span><span style="color: #007700">(</span><span style="color: #DD0000">"Techno.fdb"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$t </span><span style="color: #007700">= new </span><span style="color: #0000BB">SWFText</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">setFont</span><span style="color: #007700">(</span><span style="color: #0000BB">$f</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">moveTo</span><span style="color: #007700">(</span><span style="color: #0000BB">200</span><span style="color: #007700">, </span><span style="color: #0000BB">2400</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">setColor</span><span style="color: #007700">(</span><span style="color: #0000BB">0xff</span><span style="color: #007700">, </span><span style="color: #0000BB">0xff</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">setHeight</span><span style="color: #007700">(</span><span style="color: #0000BB">1200</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">addString</span><span style="color: #007700">(</span><span style="color: #DD0000">"PHP generates Flash with Ming!!"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$m </span><span style="color: #007700">= new </span><span style="color: #0000BB">SWFMovie</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$m</span><span style="color: #007700">-></span><span style="color: #0000BB">setDimension</span><span style="color: #007700">(</span><span style="color: #0000BB">5400</span><span style="color: #007700">, </span><span style="color: #0000BB">3600</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$m</span><span style="color: #007700">-></span><span style="color: #0000BB">add</span><span style="color: #007700">(</span><span style="color: #0000BB">$t</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type: application/x-shockwave-flash'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$m</span><span style="color: #007700">-></span><span style="color: #0000BB">output</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> </div> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.swftext.addutf8string.html">SWFText->addUTF8String</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.swftext.getascent.html">SWFText->getAscent</a></div> <div class="up"><a href="class.swftext.html">SWFText</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -