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_ICONPLOT"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>IconPlot</b></div>
9
<i>(Defined in: jpgraph.php : 7792)</i><table border=1><tr><td>&nbsp;<a href="IconPlot.html" style="font-family:arial;font-weight:bold;color:darkblue;">IconPlot</a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="IconPlot.html#_ICONPLOT_ICONPLOT">IconPlot()</a>&nbsp;<br>
10
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETANCHOR">SetAnchor()</a>&nbsp;<br>
11
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETCOUNTRYFLAG">SetCountryFlag()</a>&nbsp;<br>
12
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETMIX">SetMix()</a>&nbsp;<br>
13
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETPOS">SetPos()</a>&nbsp;<br>
14
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETSCALE">SetScale()</a>&nbsp;<br>
15
</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>Make it possible to add one or several images on top of the background in the graph. This is constructed in the same way as normal plots are created and the images are added as normal with the GRaph::Add() method.
16
 
17
It is possoble to specify arbitrary positions as well as mix (blend) and scaling.
18
 
19
Example:
20
 
21
$icon = new IconPlot('myicon.png',0.5,0.5);
22
..
23
$graph->Add($icon); <p> &nbsp;
24
<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
25
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_ICONPLOT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
26
function&nbsp;IconPlot($aFile,$aX,$aY,$aScale,$aMix)</font>
27
</b></div></a></span>
28
 
29
<span style='font-family:arial;font-size:90%;'><i>Create a new icon image to be added to the graph</i></span><p>
30
 
31
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
32
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
33
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
34
$aFile</font>
35
 
36
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
37
""</font>
38
</td><td>File name of image</td></tr>
39
 
40
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
41
$aX</font>
42
 
43
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
44
0</font>
45
</td><td>X-position</td></tr>
46
 
47
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
48
$aY</font>
49
 
50
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
51
0</font>
52
</td><td>Y-position</td></tr>
53
 
54
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
55
$aScale</font>
56
 
57
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
58
1.0</font>
59
</td><td>Scale</td></tr>
60
 
61
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
62
$aMix</font>
63
 
64
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
65
100</font>
66
</td><td>Mixin value</td></tr>
67
</table>
68
 
69
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Create a new icon image to be added to the graph. The position can be specified as either absolute coordinates or as fractions of the width and height repsectively.
70
 
71
Scale can be an arbitrary floating point number indicating the scaling of the image.
72
 
73
The mix values specifies (in percent 1-100) how much of the image should be mixed in on top of the background.
74
&nbsp;<br>
75
 
76
<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">
77
$icon&nbsp;=&nbsp;new&nbsp;IconPlot('myfile.png',0.5,0.5,1,50);
<br /></font>
78
</span><br>
79
<p>
80
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETANCHOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
81
function&nbsp;SetAnchor($aXAnchor,$aYAnchor)</font>
82
</b></div></a></span>
83
84
 
85
86
 
87
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
88
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
89
$aXAnchor</font>
90
91
 
92
'left'</font>
93
</td><td>Horizontal anchor</td></tr>
94
95
 
96
$aYAnchor</font>
97
98
 
99
'center'</font>
100
</td><td>Verticla anchor</td></tr>
101
</table>
102
103
 
104
105
 
106
107
 
108
109
 
110
$icon-&gt;SetAnchor('center','center');</font>
111
</span><br>
112
<p>
113
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETCOUNTRYFLAG"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
114
function&nbsp;SetCountryFlag($aFlag,$aX,$aY,$aScale,$aMix,$aStdSize)</font>
115
</b></div></a></span>
116
117
 
118
119
 
120
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
121
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
122
$aFlag</font>
123
124
 
125
126
 
127
$aX</font>
128
129
 
130
131
 
132
$aY</font>
133
134
 
135
136
 
137
$aScale</font>
138
139
 
140
141
 
142
$aMix</font>
143
144
 
145
146
 
147
$aStdSize</font>
148
149
 
150
</table>
151
152
 
153
&nbsp;<br>
154
155
 
156
$icon&nbsp;=&nbsp;new&nbsp;IconPlot();
<br />$icon-&gt;SetCountryFlag('norway',0.1,0.1);
<br /></font>
157
</span><br>
158
<p>
159
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETMIX"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
160
function&nbsp;SetMix($aMix)</font>
161
</b></div></a></span>
162
163
<span style='font-family:arial;font-size:90%;'><i>Specify mix value in percent (0-100) for image-</i></span><p>
164
165
 
166
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
167
 
168
$aMix</font>
169
170
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Mix value (0-100)</td></tr>
171
</table>
172
 
173
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify mix value in percent (0-100) for image. The mix value can also be specified directly in the constructor IconPlot().
174
&nbsp;<br>
175
 
176
<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">
177
$icon-&gt;SetMix(50);</font>
178
 
179
<p>
180
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
181
function&nbsp;SetPos($aX,$aY)</font>
182
</b></div></a></span>
183
184
<span style='font-family:arial;font-size:90%;'><i>Specify position for image</i></span><p>
185
186
 
187
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
188
 
189
$aX</font>
190
191
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>X-position</td></tr>
192
193
 
194
$aY</font>
195
 
196
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Y-position</td></tr>
197
</table>
198
 
199
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify position for image. Position can be specified as either absolute coordinates or as fractions of the width and height.
200
201
 
202
&nbsp;<br>
203
 
204
<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">
205
$icon-&gt;SetPos(0.5,0.5);</font>
206
</span><br>
207
<p>
208
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETSCALE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
209
function&nbsp;SetScale($aScale)</font>
210
</b></div></a></span>
211
212
<span style='font-family:arial;font-size:90%;'><i>Set scaling for image</i></span><p>
213
214
 
215
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
216
 
217
$aScale</font>
218
219
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Scale value.</td></tr>
220
</table>
221
 
222
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set scaling for image. This allows you to adjust the size of the image.&nbsp;<br>
223
224
 
225
$icon-&gt;SetScale(0.8);</font>
226
 
227
<p> <hr> <p>