Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<style type="text/css">
2
		<!--
3
		A:link        {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
4
		A:visited     {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
5
		A:hover       {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
6
		th            {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
7
		//-->
8
		</style><hr><a name="_C_SUPERSCRIPTTEXT"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>SuperScriptText</b> EXTENDS <a href="Text .html#_C_TEXT " style="font-face:arial;font-weight:bold;">Text </a></div>
9
<i>(Defined in: jpgraph.php : 3155)</i><table border=1><tr><td>&nbsp;<a href="SuperScriptText.html" style="font-family:arial;font-weight:bold;color:darkblue;">SuperScriptText</a>&nbsp;</td><td>&nbsp;<a href="Text .html" style="font-family:arial;font-weight:bold;color:darkblue;">Text </a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_FROMREAL">FromReal()</a>&nbsp;<br>
10
&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETFONTHEIGHT">GetFontHeight()</a>&nbsp;<br>
11
&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETTEXTHEIGHT">GetTextHeight()</a>&nbsp;<br>
12
&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETWIDTH">GetWidth()</a>&nbsp;<br>
13
&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SET">Set()</a>&nbsp;<br>
14
&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SETSUPERFONT">SetSuperFont()</a>&nbsp;<br>
15
&nbsp;<a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SUPERSCRIPTTEXT">SuperScriptText()</a>&nbsp;<br>
16
</td><td valign=top>&nbsp;</td></tr></table>&nbsp;<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.
17
 <p> &nbsp;
18
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="Text.html">Text</a> <p> &nbsp;<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
19
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_FROMREAL"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
20
function&nbsp;FromReal($aVal,$aPrecision)</font>
21
</b></div></a></span>
22
 
23
<span style='font-family:arial;font-size:90%;'><i>Create a scientific representation for a number </i></span><p>
24
 
25
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
26
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
27
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
28
$aVal</font>
29
 
30
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Real value to be used</td></tr>
31
 
32
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
33
$aPrecision</font>
34
 
35
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
36
2</font>
37
</td><td>Precision (number of digits) to be printed</td></tr>
38
</table>
39
 
40
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Initialized the class from a real value to be used to present a scientific text string.
41
&nbsp;<br>
42
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_SET">SuperScriptText::Set</a>
43
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
44
$t&nbsp;=&nbsp;new&nbsp;SuperScriptText();
<br />$t-&gt;FromReal(12341.56);
<br />
<br />//&nbsp;Will&nbsp;print&nbsp;1.23*10^4
<br /></font>
45
</span><br>
46
<p>
47
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_GETFONTHEIGHT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
48
function&nbsp;GetFontHeight(&amp;$aImg)</font>
49
</b></div></a></span>
50
51
<span style='font-family:arial;font-size:90%;'><i>Hight of font (approximate the height of the text)</i></span><p>
52
53
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
54
 
55
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
56
 
57
58
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Image context</td></tr>
59
</table>
60
61
 
62
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETTEXTHEIGHT">SuperScriptText::GetTextHeight</a> and <a href="SuperScriptText.html#_SUPERSCRIPTTEXT_GETWIDTH">SuperScriptText::GetWidth</a><p>
63
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_GETTEXTHEIGHT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
64
 
65
</b></div></a></span>
66
67
<span style='font-family:arial;font-size:90%;'><i>Hight of text</i></span><p>
68
69
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
70
 
71
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
72
 
73
74
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Image context</td></tr>
75
</table>
76
77
 
78
<p>
79
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_GETWIDTH"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
80
 
81
</b></div></a></span>
82
83
<span style='font-family:arial;font-size:90%;'><i>Total width of text</i></span><p>
84
85
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
86
 
87
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
88
 
89
90
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Image context</td></tr>
91
</table>
92
93
 
94
<p>
95
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_SET"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
96
 
97
</b></div></a></span>
98
99
<span style='font-family:arial;font-size:90%;'><i>Convert a floating point number to scientific notation</i></span><p>
100
101
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
102
 
103
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
104
 
105
106
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Mantissa</td></tr>
107
108
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
109
 
110
111
 
112
""</font>
113
</td><td>Exponent</td></tr>
114
 
115
116
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the string manuall by specifyin mantissa and exponent.&nbsp;<br>
117
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="SuperScriptText.html#_SUPERSCRIPTTEXT_FROMREAL">SuperScriptText::FromReal</a>
118
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
119
 
120
</span><br>
121
<p>
122
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_SETSUPERFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
123
function&nbsp;SetSuperFont($aFontFam,$aFontStyle,$aFontSize)</font>
124
</b></div></a></span>
125
126
<span style='font-family:arial;font-size:90%;'><i>Manually set font to be used for superscript</i></span><p>
127
128
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
129
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
130
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
131
$aFontFam</font>
132
 
133
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font family</td></tr>
134
 
135
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
136
$aFontStyle</font>
137
138
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
139
 
140
</td><td>Font style</td></tr>
141
 
142
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
143
$aFontSize</font>
144
 
145
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
146
8</font>
147
</td><td>Font size</td></tr>
148
 
149
150
<div style="font-weight:bold;font-family:arial;font-size:85%;">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. &nbsp;<br>
151
 
152
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_SUPERSCRIPTTEXT_SUPERSCRIPTTEXT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
153
function&nbsp;SuperScriptText($aTxt,$aSuper,$aXAbsPos,$aYAbsPos)</font>
154
</b></div></a></span>
155
156
 
157
158
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
159
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
160
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
161
$aTxt</font>
162
 
163
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
164
 
165
</td><td>Mantissa text</td></tr>
166
167
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
168
$aSuper</font>
169
 
170
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
171
""</font>
172
</td><td>Suoerscript text</td></tr>
173
 
174
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
175
$aXAbsPos</font>
176
 
177
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
178
0</font>
179
</td><td>X-position (in pixels)</td></tr>
180
 
181
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
182
$aYAbsPos</font>
183
 
184
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
185
0</font>
186
</td><td>Y-position (in pixels)</td></tr>
187
 
188
189
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Creates a new SUperSCriptClass&nbsp;<br>
190