767 lines
64 KiB
HTML
767 lines
64 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><style type="text/css">
|
||
|
<!--
|
||
|
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
|
||
|
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
|
||
|
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: underline; color: #FF0000}
|
||
|
A.no:link {font-family:inherit; font-size: inhreit;text-decoration: none; color: #000000}
|
||
|
A.no:visited {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
|
||
|
A.no:hover {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
|
||
|
th {font-family: helvetica, arial; color : black; font-size:90%; background : #b7c8b7; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
||
|
td {font-family: helvetica, arial; color : black; font-size:90%; background : white; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
||
|
|
||
|
//-->
|
||
|
</style></HEAD><hr><div style="padding-left:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;background-color:#deaa87;font-family:courier new;font-size:16pt;">Class <a class="no" name="_C_TEXT"><b>Text</b></a></div>
|
||
|
<i>(Defined in: jpgraph_text.inc.php : 17)</i><br> <br><table cellspaceing=0 cellpadding=4 style="border:solid #303030 1px;"><tr><td align="center" style="background:lightgray;" > <a href="Text.html" style="font-family:arial;font-weight:bold;color:darkblue;">Text</a> </td></tr><tr><td valign=top> <a href="Text.html#_TEXT_ALIGN">Align()</a> <br>
|
||
|
<a href="Text.html#_TEXT_CENTER">Center()</a> <br>
|
||
|
<a href="Text.html#_TEXT_GETFONTHEIGHT">GetFontHeight()</a> <br>
|
||
|
<a href="Text.html#_TEXT_GETTEXTHEIGHT">GetTextHeight()</a> <br>
|
||
|
<a href="Text.html#_TEXT_GETWIDTH">GetWidth()</a> <br>
|
||
|
<a href="Text.html#_TEXT_HIDE">Hide()</a> <br>
|
||
|
<a href="Text.html#_TEXT_PARAGRAPHALIGN">ParagraphAlign()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SET">Set()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETALIGN">SetAlign()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETANGLE">SetAngle()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETBOX">SetBox()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETCOLOR">SetColor()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETCSIMTARGET">SetCSIMTarget()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETFONT">SetFont()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETMARGIN">SetMargin()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETORIENTATION">SetOrientation()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETPARAGRAPHALIGN">SetParagraphAlign()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETPOS">SetPos()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETSCALEPOS">SetScalePos()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETSHADOW">SetShadow()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SETWORDWRAP">SetWordWrap()</a> <br>
|
||
|
<a href="Text.html#_TEXT_SHOW">Show()</a> <br>
|
||
|
<a href="Text.html#_TEXT___CONSTRUCT">__construct()</a> <br>
|
||
|
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>All text that is to be draw onto any graph is handled by this class. You create each text you want printed as an instance of this class.
|
||
|
|
||
|
It is possible to adjust both font, color, alignment and paragraph alignment.
|
||
|
|
||
|
If the text contains multiple lines (separated by "\n") the paragraph alignment determines how each line is formatted (i.e. left,center or right)
|
||
|
<p>
|
||
|
<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_ALIGN"><span style="color:#555555;">Text ::</span><br><b>Align</b>($aHAlign, $aVAlign, $aParagraphAlign)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specify alignment for the text in relation to the x,y position for text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aHAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Horizontal alignment</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aVAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">"top"</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Vertical alignment</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aParagraphAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">""</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Paragraph alignment</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>This determines how the text's x,y position is to be interpretated.
|
||
|
|
||
|
Valid horizontal alignments are
|
||
|
<ul>
|
||
|
<li> 'left'
|
||
|
<li> 'center'
|
||
|
<li> 'right'
|
||
|
</ul>
|
||
|
|
||
|
Valid vertical position are
|
||
|
<ul>
|
||
|
<li> 'top'
|
||
|
<li> 'middle' or 'center'
|
||
|
<li> 'bottom'
|
||
|
</ul>
|
||
|
|
||
|
Valid paragraph alignment
|
||
|
<ul>
|
||
|
<li> 'left'
|
||
|
<li> 'center'
|
||
|
<li> 'right'
|
||
|
</ul>
|
||
|
<br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_PARAGRAPHALIGN">Text::ParagraphAlign()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$text </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_CENTER"><span style="color:#555555;">Text ::</span><br><b>Center</b>($aLeft, $aRight, $aYAbsPos)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Center the text between left and right coordinates</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aLeft</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Left corner X-coordinate</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aRight</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Right corner X-coordinate</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aYAbsPos</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>The common Y-coodinate</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Center the text between left and right coordinates on the same Y-coordinate <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Center</span><span style="color: #007700">(</span><span style="color: #0000BB">50</span><span style="color: #007700">,</span><span style="color: #0000BB">150</span><span style="color: #007700">,</span><span style="color: #0000BB">75</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_GETFONTHEIGHT"><span style="color:#555555;">Text ::</span><br><b>GetFontHeight</b>($aImg)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Height of font</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aImg</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Return the height of the font used in the text.
|
||
|
|
||
|
The difference between this method and the GetTextHeight() is that this method uses a predefined character to determine the height while GetTextHeight() uses the actual text in the string.
|
||
|
<br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_GETTEXTHEIGHT">Text::GetTextHeight()</a><li><a href="Text.html#_TEXT_GETWIDTH">Text::GetWidth()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$height </span><span style="color: #007700">= </span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">GetFontHeight</span><span style="color: #007700">(</span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">img</span><span style="color: #007700">)</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_GETTEXTHEIGHT"><span style="color:#555555;">Text ::</span><br><b>GetTextHeight</b>($aImg)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Return the height of the actual text in the text object</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aImg</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Return the height of the text in this object.
|
||
|
|
||
|
The difference between this method and the GetFontHeight() is that that method uses a predefined character to determine the height while GetTextHeight() uses the actual text in the string. <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_GETFONTHEIGHT">Text::GetFontHeight()</a><li><a href="Text.html#_TEXT_GETWIDTH">Text::GetWidth()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$height </span><span style="color: #007700">= </span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">GetTextHeight</span><span style="color: #007700">(</span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">img</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_GETWIDTH"><span style="color:#555555;">Text ::</span><br><b>GetWidth</b>($aImg)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Get total width of text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aImg</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Get total width of text <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_GETTEXTHEIGHT">Text::GetTextHeight()</a><li><a href="Text.html#_TEXT_GETFONTHEIGHT">Text::GetFontHeight()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$width </span><span style="color: #007700">= </span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">GetWidth</span><span style="color: #007700">(</span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">img</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_HIDE"><span style="color:#555555;">Text ::</span><br><b>Hide</b>($aHide)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Hide the text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aHide</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">true</span>
|
||
|
</span>
|
||
|
</td><td>True=Hide text</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>The opposite of Show() <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_SHOW">Text::Show()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Hide</span><span style="color: #007700">();</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_PARAGRAPHALIGN"><span style="color:#555555;">Text ::</span><br><b>ParagraphAlign</b>($aAlign)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specifies the alignment for a multi line text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Alignment for a multiline text</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify the paragraph alignment for a multi line text. Each text line is separated by a "\n" character.
|
||
|
|
||
|
Valid alignments are:
|
||
|
<ul>
|
||
|
<li> 'left'
|
||
|
<li> 'center'
|
||
|
<li> 'right'
|
||
|
</ul> <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_ALIGN">Text::Align()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #DD0000">"The first line\nSec line\nThird line"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">ParagraphAlign</span><span style="color: #007700">(</span><span style="color: #DD0000">'center'</span><span style="color: #007700">);
<br />
<br /></span><span style="color: #FF8000">// Will give the result:
<br />//
<br />// The first line
<br />// Sec line
<br />// Third line
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SET"><span style="color:#555555;">Text ::</span><br><b>Set</b>($aTxt)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Set text to be displayed</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aTxt</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Text string</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set text to be displayed <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #DD0000">'Hello world'</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETALIGN"><span style="color:#555555;">Text ::</span><br><b>SetAlign</b>($aHAlign, $aVAlign, $aParagraphAlign)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Alias for Align()</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aHAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Horizontal anchor point</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aVAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">"top"</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Vertical anchor point</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aParagraphAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">""</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Paragraph alignment</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>See Align <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_ALIGN">Text::Align()</a></ul><p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETANGLE"><span style="color:#555555;">Text ::</span><br><b>SetAngle</b>($aAngle)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specify text angle</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aAngle</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Angle in degrees</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify Orientation of text. If TTF fonts are used then the orientation can be a arbitrary angle. If the builtin fonts are used then only horizontal and vertical position can be used, i.e 0 or 90 degrees, <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetAngle</span><span style="color: #007700">(</span><span style="color: #0000BB">45</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETBOX"><span style="color:#555555;">Text ::</span><br><b>SetBox</b>($aFrameColor, $aBorderColor, $aShadowColor, $aCornerRadius, $aShadowWidth)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Set parameters for poossible frame around text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aFrameColor</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #007700">array(</span><span style="color: #0000BB">255</span><span style="color: #007700">,</span><span style="color: #0000BB">255</span><span style="color: #007700">,</span><span style="color: #0000BB">255</span><span style="color: #007700">)</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Color for text background</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aBorderColor</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #007700">array(</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">)</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Color for border around text</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aShadowColor</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">false</span>
|
||
|
</span>
|
||
|
</td><td>Color for shadow</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aCornerRadius</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">4</span>
|
||
|
</span>
|
||
|
</td><td>Corner radius for rectangle</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aShadowWidth</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">3</span>
|
||
|
</span>
|
||
|
</td><td>Drop shadow width</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify parameters for background color, border and possible text drop shadow.
|
||
|
<br>
|
||
|
If no shadow color is specified then no shadow will appear.
|
||
|
<p>
|
||
|
To use the old style of stright corners specify a corner radius of 0.
|
||
|
|
||
|
<br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_SETSHADOW">Text::SetShadow()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(</span><span style="color: #DD0000">"Note: Simple textnote.\nWIth two lines"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFont</span><span style="color: #007700">(</span><span style="color: #0000BB">FF_FONT1</span><span style="color: #007700">,</span><span style="color: #0000BB">FS_BOLD</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Pos</span><span style="color: #007700">(</span><span style="color: #0000BB">0.5</span><span style="color: #007700">,</span><span style="color: #0000BB">0.97</span><span style="color: #007700">,</span><span style="color: #DD0000">'center'</span><span style="color: #007700">,</span><span style="color: #DD0000">'bottom'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetBox</span><span style="color: #007700">(</span><span style="color: #DD0000">'yellow'</span><span style="color: #007700">,</span><span style="color: #DD0000">'black'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddText</span><span style="color: #007700">(</span><span style="color: #0000BB">$txt</span><span style="color: #007700">);
<br />
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETCOLOR"><span style="color:#555555;">Text ::</span><br><b>SetColor</b>($aColor)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Set text color</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aColor</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Color</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify color for text <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'darkblue'</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETCSIMTARGET"><span style="color:#555555;">Text ::</span><br><b>SetCSIMTarget</b>($aURITarget, $aAlt, $aWinTarget)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specify CSIM Target for text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aURITarget</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>No description available</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aAlt</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Alt-tag text</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aWinTarget</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>No description available</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify Client Side Image Target for text <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">title</span><span style="color: #007700">-></span><span style="color: #0000BB">SetCSIMTarget</span><span style="color: #007700">(</span><span style="color: #DD0000">'mainpage.html'</span><span style="color: #007700">,</span><span style="color: #DD0000">'Go to main page'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETFONT"><span style="color:#555555;">Text ::</span><br><b>SetFont</b>($aFamily, $aStyle, $aSize)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specify font</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aFamily</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Font family</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aStyle</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">FS_NORMAL</span>
|
||
|
</span>
|
||
|
</td><td>Font style</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aSize</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">10</span>
|
||
|
</span>
|
||
|
</td><td>Font size</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify font family, size and style. Two major types of font families can be used, builtin bitmnapped fonts or TTF fonts. The builtin fonts have a fixed size which can't be altered.
|
||
|
|
||
|
Valid styles are
|
||
|
<ul>
|
||
|
<li> FS_NORMAL
|
||
|
<li> FS_BOLD
|
||
|
<li> FS_ITALIC
|
||
|
<li> FS_BOLDITALIC
|
||
|
</ul>
|
||
|
|
||
|
Valid values for the internal font families are
|
||
|
<ul>
|
||
|
<li> FF_FONT0, Internal font 1 (small font)
|
||
|
<li> FF_FONT1, Internal font 2, (Medium size)
|
||
|
<li> FF_FONT2, Internal font 3, (large size)
|
||
|
</ul>
|
||
|
|
||
|
Note: FF_FONT0 only suppor font style FS_NORMAL
|
||
|
|
||
|
The available TTF are by default
|
||
|
<ul>
|
||
|
<li> FF_ARIAL
|
||
|
<li> FF_TIMES, (Times Roman)
|
||
|
<li> FF_COURIER, (Courier new)
|
||
|
<li> FF_VERDANA, (Verdana)
|
||
|
<li> FF_BOOK, (Bookman)
|
||
|
<li> FF_HANDWRT, (Handwriting)
|
||
|
<li> FF_COMIC, (Sans Comic)
|
||
|
</ul>
|
||
|
<br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Image.html#_IMAGE_STROKETEXT">Image::StrokeText()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFont</span><span style="color: #007700">(</span><span style="color: #0000BB">FF_ARIAL</span><span style="color: #007700">, </span><span style="color: #0000BB">FS_BOLD</span><span style="color: #007700">, </span><span style="color: #0000BB">14</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETMARGIN"><span style="color:#555555;">Text ::</span><br><b>SetMargin</b>($aMarg)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Set the contect sensiive margin</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aMarg</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Margin in pixels</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify a context sensitive margin for the text. Depending on in which context the text is used the margin will be interpretated accordingly. <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #FF8000">// Start further away from the top of graph
<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">title</span><span style="color: #007700">-></span><span style="color: #0000BB">SetMargin</span><span style="color: #007700">(</span><span style="color: #0000BB">15</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETORIENTATION"><span style="color:#555555;">Text ::</span><br><b>SetOrientation</b>($aDirection)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Deprecated. Use SetAngle instead. Specify text angle </i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aDirection</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">0</span>
|
||
|
</span>
|
||
|
</td><td>Orientation of text in degrees</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Deprecated. Use SetAngle() instead.
|
||
|
Specify Orientation of text. If TTF fonts are used then the orientation can be a arbitrary angle. If the builtin fonts are used then only horizontal and vertical position can be used, i.e 0 or 90 degrees, <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetOrientation</span><span style="color: #007700">(</span><span style="color: #0000BB">90</span><span style="color: #007700">); </span><span style="color: #FF8000">// Vertical text</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETPARAGRAPHALIGN"><span style="color:#555555;">Text ::</span><br><b>SetParagraphAlign</b>($aAlign)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specifies the alignment for a multi line text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Horizontal alignment</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Determines how a multi-line text paragraph will be formatted. Each line in the paragraph will be treated individually. Allowed values are
|
||
|
<ol>
|
||
|
<li> "center"
|
||
|
<li> "left"
|
||
|
<li> "right"
|
||
|
</ol>
|
||
|
|
||
|
Note: Paragraph alignment is only applicable to horizontal text, i.e. angle = 0 . For paragraphs at an angle the alignbment will always be "left".
|
||
|
<br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">title</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #DD0000">"Multi line\ntext !"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">title</span><span style="color: #007700">-></span><span style="color: #0000BB">SetParagraphAlign</span><span style="color: #007700">(</span><span style="color: #DD0000">'right'</span><span style="color: #007700">);
<br />
<br /></span><span style="color: #FF8000">// Default for title is "center"
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETPOS"><span style="color:#555555;">Text ::</span><br><b>SetPos</b>($aXAbsPos, $aYAbsPos, $aHAlign, $aVAlign)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Alias for Pos()</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aXAbsPos</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>X position</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aYAbsPos</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Y position</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aHAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Horizontal align</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aVAlign</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Vertical align</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Alias for Pos() <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_SETSCALEPOS">Text::SetScalePos()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Pos</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">,</span><span style="color: #0000BB">150</span><span style="color: #007700">,</span><span style="color: #DD0000">'center'</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETSCALEPOS"><span style="color:#555555;">Text ::</span><br><b>SetScalePos</b>($aX, $aY)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specify the position of the text using the plot scale positions</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aX</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>X-position</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aY</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Y-position</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify the position of the text using the plot scale positions. The Y position is taken to be the Y axis. It is not possible to use Y2 scale to specify the position. <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetScalePos</span><span style="color: #007700">(</span><span style="color: #0000BB">27.3</span><span style="color: #007700">, </span><span style="color: #0000BB">278.9</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETSHADOW"><span style="color:#555555;">Text ::</span><br><b>SetShadow</b>($aShadowColor, $aShadowWidth)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Add a drop shadow to boxed text</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aShadowColor</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #DD0000">'gray'</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</td><td>Shadow color</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aShadowWidth</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">3</span>
|
||
|
</span>
|
||
|
</td><td>Shadow width (in pixels)</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>If the text has been boxed (by call to SetBox()) then you can easily add a drop shadow by just calling this method.
|
||
|
<p>
|
||
|
Note: You can also specify the shadow directly in the SetBox() call. This method was added to make Text more like other graph objects which have a SetShadow() method. <br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_SETBOX">Text::SetBox()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(</span><span style="color: #DD0000">"Note: Simple textnote.\nWIth two lines"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFont</span><span style="color: #007700">(</span><span style="color: #0000BB">FF_FONT1</span><span style="color: #007700">,</span><span style="color: #0000BB">FS_BOLD</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Pos</span><span style="color: #007700">(</span><span style="color: #0000BB">0.5</span><span style="color: #007700">,</span><span style="color: #0000BB">0.97</span><span style="color: #007700">,</span><span style="color: #DD0000">'center'</span><span style="color: #007700">,</span><span style="color: #DD0000">'bottom'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetBox</span><span style="color: #007700">(</span><span style="color: #DD0000">'yellow'</span><span style="color: #007700">,</span><span style="color: #DD0000">'black'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetShadow</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddText</span><span style="color: #007700">(</span><span style="color: #0000BB">$txt</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SETWORDWRAP"><span style="color:#555555;">Text ::</span><br><b>SetWordWrap</b>($aCol)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Specify a maximum line length</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aCol</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Number of chars in column</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify a maximum line length. This method will insert suitable line breaks to ensure thateach line never exeeds the specified number of characters. The method will not break words. <br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(</span><span style="color: #DD0000">'A suitable long text which will be broken'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetWordWrap</span><span style="color: #007700">(</span><span style="color: #0000BB">15</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT_SHOW"><span style="color:#555555;">Text ::</span><br><b>Show</b>($aShow)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Show or hide the text string</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aShow</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">true</span>
|
||
|
</span>
|
||
|
</td><td>True=Display text</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Show or hide the text string. By default the text string is turned off. So a call to Show() is becessary for the text string to be displayed in the graph.
|
||
|
<br>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Show</span><span style="color: #007700">();
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p>
|
||
|
<p> <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_TEXT___CONSTRUCT"><span style="color:#555555;">Text ::</span><br><b>__construct</b>($aTxt, $aXAbsPos, $aYAbsPos)</a></div>
|
||
|
|
||
|
<span style='font-family:arial;font-size:95%;'><i>Constructor. Create new text at absolute pixel coordinates</i></span><p>
|
||
|
|
||
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
||
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aTxt</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Text string</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aXAbsPos</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>X-coordinate</td></tr>
|
||
|
|
||
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
|
||
|
<span style="color: #0000BB">$aYAbsPos</span>
|
||
|
</span>
|
||
|
|
||
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Y-coordinate</td></tr>
|
||
|
</table>
|
||
|
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Create a new object to repesent a text string that is to be displayed on the graph.
|
||
|
|
||
|
If the position is not specified when the object is created it can later be specified with a call to the Pos() method.
|
||
|
|
||
|
The default alignment is to interpret the x,y coordinate as being the lower left corner of the bounding box for the text string.
|
||
|
|
||
|
Note. The texts are hidden by default and you must remember toi call Show() to make the text appear in the image. <br>
|
||
|
<br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Returns</div>An istance of class Text<br>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT_SETPOS">Text::SetPos()</a><li><a href="Text.html#_TEXT_SET">Text::Set()</a><li><a href="Text.html#_TEXT_PARAGRAPHALIGN">Text::ParagraphAlign()</a><li><a href="Text.html#_TEXT_SHOW">Text::Show()</a></ul>
|
||
|
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
|
||
|
<span style="color: #0000BB"></span><span style="color: #FF8000">// Possible creations of text objects
<br />
<br />// Case 1. Text and position is specified later
<br /></span><span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">();
<br />
<br /></span><span style="color: #FF8000">// Case 2. Position is specified later
<br /></span><span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(</span><span style="color: #DD0000">'Hello world'</span><span style="color: #007700">);
<br />
<br /></span><span style="color: #FF8000">// Case 3. Full specification
<br /></span><span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(</span><span style="color: #DD0000">'Hello world'</span><span style="color: #007700">,</span><span style="color: #0000BB">100</span><span style="color: #007700">,</span><span style="color: #0000BB">150</span><span style="color: #007700">);
<br />
<br /></span><span style="color: #FF8000">// A more real life example
<br /></span><span style="color: #0000BB">$txt </span><span style="color: #007700">= new </span><span style="color: #0000BB">Text</span><span style="color: #007700">(</span><span style="color: #DD0000">"Note: Simple textnote.\nWIth two lines"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetFont</span><span style="color: #007700">(</span><span style="color: #0000BB">FF_FONT1</span><span style="color: #007700">,</span><span style="color: #0000BB">FS_BOLD</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">Pos</span><span style="color: #007700">(</span><span style="color: #0000BB">0.5</span><span style="color: #007700">,</span><span style="color: #0000BB">0.97</span><span style="color: #007700">,</span><span style="color: #DD0000">'center'</span><span style="color: #007700">,</span><span style="color: #DD0000">'bottom'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$txt</span><span style="color: #007700">-></span><span style="color: #0000BB">SetBox</span><span style="color: #007700">(</span><span style="color: #DD0000">'yellow'</span><span style="color: #007700">,</span><span style="color: #DD0000">'black'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-></span><span style="color: #0000BB">AddText</span><span style="color: #007700">(</span><span style="color: #0000BB">$txt</span><span style="color: #007700">);
<br />
<br />
<br />
<br /></span><span style="color: #0000BB"></span>
|
||
|
</span>
|
||
|
</b></div><br>
|
||
|
<p> <hr> <p></html>
|