228 lines
18 KiB
HTML
228 lines
18 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_SUPERSCRIPTTEXT"><b>SuperScriptText</b></a> Extends <a style="font-size:14pt;text-decoration:underline;"href="Text.html#_C_TEXT " style="font-face:arial;font-weight:bold;">Text </a></div>
|
|
<i>(Defined in: jpgraph.php : 3116)</i><br> <br><table cellspaceing=0 cellpadding=4 style="border:solid #303030 1px;"><tr><td align="center" style="background:lightgray;" > <a href="SuperScriptText.html" style="font-family:arial;font-weight:bold;color:darkblue;">SuperScriptText</a> </td><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="SuperScriptText.html#_SUPERSCRIPTTEXT_FROMREAL">FromReal()</a> <br>
|
|
<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETFONTHEIGHT">GetFontHeight()</a> <br>
|
|
<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETTEXTHEIGHT">GetTextHeight()</a> <br>
|
|
<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETWIDTH">GetWidth()</a> <br>
|
|
<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SET">Set()</a> <br>
|
|
<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SETSUPERFONT">SetSuperFont()</a> <br>
|
|
<a href="SuperScriptText.html#_SUPERSCRIPTTEXT___CONSTRUCT">__construct()</a> <br>
|
|
</td><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" style="color:darkgrey;">GetFontHeight() </a><br>
|
|
<a href="Text.html#_TEXT_GETTEXTHEIGHT" style="color:darkgrey;">GetTextHeight() </a><br>
|
|
<a href="Text.html#_TEXT_GETWIDTH" style="color:darkgrey;">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" style="color:darkgrey;">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" style="color:darkgrey;">__construct() </a><br>
|
|
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>This class is responsible for formatting a text string which have a superscript at the end. This is used to generate scientific numbers.
|
|
<p>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="Text.html">Text</a> <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="_SUPERSCRIPTTEXT_FROMREAL"><span style="color:#555555;">SuperScriptText ::</span><br><b>FromReal</b>($aVal, $aPrecision)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Create a scientific representation for a number </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">$aVal</span>
|
|
</span>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'> </td><td>Real value to be used</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">$aPrecision</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">2</span>
|
|
</span>
|
|
</td><td>Precision (number of digits) to be printed</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Initialized the class from a real value to be used to present a scientific text string.
|
|
<br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SET">SuperScriptText::Set()</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">$t </span><span style="color: #007700">= new </span><span style="color: #0000BB">SuperScriptText</span><span style="color: #007700">();
|
|
<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">FromReal</span><span style="color: #007700">(</span><span style="color: #0000BB">12341.56</span><span style="color: #007700">);
|
|
<br />
|
|
<br /></span><span style="color: #FF8000">// Will print 1.23*10^4
|
|
<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="_SUPERSCRIPTTEXT_GETFONTHEIGHT"><span style="color:#555555;">SuperScriptText ::</span><br><b>GetFontHeight</b>($aImg)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Hight of font (approximate the height of 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">$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 height of text. <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETTEXTHEIGHT">SuperScriptText::GetTextHeight()</a><li><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETWIDTH">SuperScriptText::GetWidth()</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="_SUPERSCRIPTTEXT_GETTEXTHEIGHT"><span style="color:#555555;">SuperScriptText ::</span><br><b>GetTextHeight</b>($aImg)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Hight 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>Hight of text <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="_SUPERSCRIPTTEXT_GETWIDTH"><span style="color:#555555;">SuperScriptText ::</span><br><b>GetWidth</b>($aImg)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>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>Total width of text <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="_SUPERSCRIPTTEXT_SET"><span style="color:#555555;">SuperScriptText ::</span><br><b>Set</b>($aTxt, $aSuper)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Convert a floating point number to scientific notation</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>Mantissa</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">$aSuper</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>Exponent</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify the string manuall by specifyin mantissa and exponent. <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_FROMREAL">SuperScriptText::FromReal()</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">$t </span><span style="color: #007700">= new </span><span style="color: #0000BB">SuperScriptText</span><span style="color: #007700">();
|
|
<br /></span><span style="color: #0000BB">$t</span><span style="color: #007700">-></span><span style="color: #0000BB">Set</span><span style="color: #007700">(</span><span style="color: #DD0000">"1.34 10"</span><span style="color: #007700">,</span><span style="color: #DD0000">"5"</span><span style="color: #007700">);
|
|
<br /></span><span style="color: #FF8000">// Will generate "1.34 10^5"
|
|
<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="_SUPERSCRIPTTEXT_SETSUPERFONT"><span style="color:#555555;">SuperScriptText ::</span><br><b>SetSuperFont</b>($aFontFam, $aFontStyle, $aFontSize)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Manually set font to be used for superscript</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">$aFontFam</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">$aFontStyle</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">$aFontSize</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">8</span>
|
|
</span>
|
|
</td><td>Font size</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Used to manually specify font to be used for superscript. If not specified it will be detemined automatically based on the font used for the mantissa. The font for the superscript will be roughly 70% of the size of the base font. <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="_SUPERSCRIPTTEXT___CONSTRUCT"><span style="color:#555555;">SuperScriptText ::</span><br><b>__construct</b>($aTxt, $aSuper, $aXAbsPos, $aYAbsPos)</a></div>
|
|
|
|
<span style='font-family:arial;font-size:95%;'><i>Constructor</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;'><span style="color: #000000">
|
|
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
|
|
</span>
|
|
</td><td>Mantissa 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">$aSuper</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>Suoerscript 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">$aXAbsPos</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>X-position (in pixels)</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;'><span style="color: #000000">
|
|
<span style="color: #0000BB">0</span>
|
|
</span>
|
|
</td><td>Y-position (in pixels)</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Creates a new SUperSCriptClass <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="Text.html#_TEXT___CONSTRUCT">Text::__construct()</a></ul><p> <hr> <p></html> |