| 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_CANVASRECTANGLETEXT"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>CanvasRectangleText</b></div>
|
|
|
9 |
<i>(Defined in: jpgraph_canvtools.php : 375)</i><table border=1><tr><td> <a href="CanvasRectangleText.html" style="font-family:arial;font-weight:bold;color:darkblue;">CanvasRectangleText</a> </td></tr><tr><td valign=top> <a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_CANVASRECTANGLETEXT">CanvasRectangleText()</a> <br>
|
|
|
10 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_PARAGRAPHALIGN">ParagraphAlign()</a> <br>
|
|
|
11 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_POS">Pos()</a> <br>
|
|
|
12 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SET">Set()</a> <br>
|
|
|
13 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETAUTOMARGIN">SetAutoMargin()</a> <br>
|
|
|
14 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETCOLOR">SetColor()</a> <br>
|
|
|
15 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETCORNERRADIUS">SetCornerRadius()</a> <br>
|
|
|
16 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETFILLCOLOR">SetFillColor()</a> <br>
|
|
|
17 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETFONT">SetFont()</a> <br>
|
|
|
18 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETFONTCOLOR">SetFontColor()</a> <br>
|
|
|
19 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETPOS">SetPos()</a> <br>
|
|
|
20 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETSHADOW">SetShadow()</a> <br>
|
|
|
21 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETTXT">SetTxt()</a> <br>
|
|
|
22 |
<a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_STROKE">Stroke()</a> <br>
|
|
|
23 |
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>YOu can use this class to convieniently draw a text on canvas. The text may have multiple lines wher each line is separated by a "\n" (newline) character.
|
|
|
24 |
<p>
|
|
|
25 |
The text may also be enclosed in a rounded (possibly filled) rectangle.
|
|
|
26 |
<p>
|
|
|
27 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="CanvasGraph.html">CanvasGraph</a> and <a href="CanvasScale.html">CanvasScale</a> <p> <hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
|
|
28 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_CANVASRECTANGLETEXT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
29 |
function CanvasRectangleText($aTxt,$xl,$yt,$w,$h)</font>
|
|
|
30 |
</b></div></a></span>
|
|
|
31 |
|
|
|
32 |
<span style='font-family:arial;font-size:90%;'><i>Draws a text paragraph inside a rounded, possibly filled, rectangle</i></span><p>
|
|
|
33 |
|
|
|
34 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
35 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
36 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
37 |
$aTxt</font>
|
|
|
38 |
|
|
|
39 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
40 |
''</font>
|
|
|
41 |
</td><td>Text</td></tr>
|
|
|
42 |
|
|
|
43 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
44 |
$xl</font>
|
|
|
45 |
|
|
|
46 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
47 |
0</font>
|
|
|
48 |
</td><td>Top left X</td></tr>
|
|
|
49 |
|
|
|
50 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
51 |
$yt</font>
|
|
|
52 |
|
|
|
53 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
54 |
0</font>
|
|
|
55 |
</td><td>Top left Y</td></tr>
|
|
|
56 |
|
|
|
57 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
58 |
$w</font>
|
|
|
59 |
|
|
|
60 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
61 |
0</font>
|
|
|
62 |
</td><td>Width</td></tr>
|
|
|
63 |
|
|
|
64 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
65 |
$h</font>
|
|
|
66 |
|
|
|
67 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
68 |
0</font>
|
|
|
69 |
</td><td>Height</td></tr>
|
|
|
70 |
</table>
|
|
|
71 |
|
|
|
72 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Draws a text paragraph inside a rounded, possible filled, rectangle. <br>
|
|
|
73 |
|
|
|
74 |
<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">
|
|
|
75 |
|
|
|
76 |
</span><br>
|
|
|
77 |
<p>
|
|
|
78 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_PARAGRAPHALIGN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
79 |
function ParagraphAlign($aParaAlign)</font>
|
|
|
80 |
</b></div></a></span>
|
|
|
81 |
|
|
|
82 |
<span style='font-family:arial;font-size:90%;'><i>Specify paragraph alignment for the text</i></span><p>
|
|
|
83 |
|
|
|
84 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
85 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
86 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
87 |
$aParaAlign</font>
|
|
|
88 |
|
|
|
89 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Alignment</td></tr>
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify paragraph alignment for the text. Alignments can be:
|
|
|
93 |
|
|
|
94 |
<ul>
|
|
|
95 |
|
|
|
96 |
<li> "center"
|
|
|
97 |
<li> "right"
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
<br />$g = new CanvasGraph(550,450);
<br />$scale = new CanvasScale($g);
<br />$scale->Set(0,27,0,53);
<br />//
<br />$t = new CanvasRectangleText();
<br />$t->SetFillColor('lightgreen');
<br />$t->SetFontColor('navy');
<br />$t->SetFont(FF_ARIAL,FS_NORMAL,16);
<br />$t->ParagraphAlign('center');
<br />$t->Set("First line\nSecond line",0.5,19,26,32);
<br />$t->Stroke($g->img,$scale);
<br /></font>
|
|
|
102 |
</span><br>
|
|
|
103 |
<p>
|
|
|
104 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_POS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
105 |
function Pos($xl,$yt,$w,$h)</font>
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
111 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
112 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
113 |
$xl</font>
|
|
|
114 |
|
|
|
115 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
116 |
0</font>
|
|
|
117 |
</td><td>Top left X</td></tr>
|
|
|
118 |
|
|
|
119 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
120 |
$yt</font>
|
|
|
121 |
|
|
|
122 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
123 |
0</font>
|
|
|
124 |
</td><td>Top left Y</td></tr>
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
$w</font>
|
|
|
128 |
|
|
|
129 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
130 |
0</font>
|
|
|
131 |
</td><td>Width</td></tr>
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
$h</font>
|
|
|
135 |
|
|
|
136 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
137 |
|
|
|
138 |
</td><td>Height</td></tr>
|
|
|
139 |
</table>
|
|
|
140 |
|
|
|
141 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set position for text. All coordinates will be translaed according to the current scale used.
|
|
|
142 |
<br>
|
|
|
143 |
<p>
|
|
|
144 |
|
|
|
145 |
function Set($aTxt,$xl,$yt,$w,$h)</font>
|
|
|
146 |
</b></div></a></span>
|
|
|
147 |
|
|
|
148 |
<span style='font-family:arial;font-size:90%;'><i>Specify the text and position</i></span><p>
|
|
|
149 |
|
|
|
150 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
151 |
|
|
|
152 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
153 |
$aTxt</font>
|
|
|
154 |
|
|
|
155 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Text</td></tr>
|
|
|
156 |
|
|
|
157 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
158 |
$xl</font>
|
|
|
159 |
|
|
|
160 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Top left X</td></tr>
|
|
|
161 |
|
|
|
162 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
163 |
$yt</font>
|
|
|
164 |
|
|
|
165 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Top left Y</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 |
|
|
|
169 |
|
|
|
170 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
171 |
0</font>
|
|
|
172 |
</td><td>Width</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 |
|
|
|
176 |
|
|
|
177 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
178 |
|
|
|
179 |
</td><td>Height</td></tr>
|
|
|
180 |
|
|
|
181 |
|
|
|
182 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the text and position. All coordinates will be translated using the specified scale when stroked. <br>
|
|
|
183 |
|
|
|
184 |
<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">
|
|
|
185 |
|
|
|
186 |
</span><br>
|
|
|
187 |
<p>
|
|
|
188 |
|
|
|
189 |
function SetAutoMargin($aMargin)</font>
|
|
|
190 |
</b></div></a></span>
|
|
|
191 |
|
|
|
192 |
|
|
|
193 |
|
|
|
194 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
195 |
|
|
|
196 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
197 |
$aMargin</font>
|
|
|
198 |
|
|
|
199 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Margin in pixels</td></tr>
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
<p>
|
|
|
204 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_SETCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
205 |
function SetColor($aColor)</font>
|
|
|
206 |
</b></div></a></span>
|
|
|
207 |
|
|
|
208 |
<span style='font-family:arial;font-size:90%;'><i>Set border color for rectangle</i></span><p>
|
|
|
209 |
|
|
|
210 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
211 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
212 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
|
216 |
</table>
|
|
|
217 |
|
|
|
218 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set border color for rectangle <br>
|
|
|
219 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETFONTCOLOR">CanvasRectangleText::SetFontColor</a> and <a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETFILLCOLOR">CanvasRectangleText::SetFillColor</a>
|
|
|
220 |
|
|
|
221 |
$t->SetColor('navy');</font>
|
|
|
222 |
</span><br>
|
|
|
223 |
|
|
|
224 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_SETCORNERRADIUS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
225 |
function SetCornerRadius($aRad)</font>
|
|
|
226 |
</b></div></a></span>
|
|
|
227 |
|
|
|
228 |
<span style='font-family:arial;font-size:90%;'><i>Set radius for corners</i></span><p>
|
|
|
229 |
|
|
|
230 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
231 |
|
|
|
232 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
233 |
$aRad</font>
|
|
|
234 |
|
|
|
235 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
236 |
|
|
|
237 |
</td><td>Radius in pixels</td></tr>
|
|
|
238 |
</table>
|
|
|
239 |
|
|
|
240 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the radius for the rounded corners. Specifying the value as 0 will give normal square corners.
|
|
|
241 |
|
|
|
242 |
<br>
|
|
|
243 |
|
|
|
244 |
<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">
|
|
|
245 |
$t->SetCornerRadius(15);</font>
|
|
|
246 |
</span><br>
|
|
|
247 |
<p>
|
|
|
248 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_SETFILLCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
249 |
|
|
|
250 |
</b></div></a></span>
|
|
|
251 |
|
|
|
252 |
<span style='font-family:arial;font-size:90%;'><i>Specify fill color for rectangle</i></span><p>
|
|
|
253 |
|
|
|
254 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
255 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
256 |
|
|
|
257 |
$aFillColor</font>
|
|
|
258 |
|
|
|
259 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Color</td></tr>
|
|
|
260 |
</table>
|
|
|
261 |
|
|
|
262 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify fill color for rectangle <br>
|
|
|
263 |
|
|
|
264 |
<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">
|
|
|
265 |
|
|
|
266 |
</span><br>
|
|
|
267 |
<p>
|
|
|
268 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_SETFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
269 |
function SetFont($FontFam,$aFontStyle,$aFontSize)</font>
|
|
|
270 |
</b></div></a></span>
|
|
|
271 |
|
|
|
272 |
<span style='font-family:arial;font-size:90%;'><i>Specify font</i></span><p>
|
|
|
273 |
|
|
|
274 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
275 |
|
|
|
276 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
277 |
$FontFam</font>
|
|
|
278 |
|
|
|
279 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Font family</td></tr>
|
|
|
280 |
|
|
|
281 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
282 |
$aFontStyle</font>
|
|
|
283 |
|
|
|
284 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Font style</td></tr>
|
|
|
285 |
|
|
|
286 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
287 |
$aFontSize</font>
|
|
|
288 |
|
|
|
289 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
290 |
12</font>
|
|
|
291 |
</td><td>Font size</td></tr>
|
|
|
292 |
</table>
|
|
|
293 |
|
|
|
294 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify font <br>
|
|
|
295 |
|
|
|
296 |
<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">
|
|
|
297 |
|
|
|
298 |
</span><br>
|
|
|
299 |
<p>
|
|
|
300 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_SETFONTCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
301 |
function SetFontColor($aColor)</font>
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
307 |
|
|
|
308 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
309 |
|
|
|
310 |
|
|
|
311 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Color specification</td></tr>
|
|
|
312 |
|
|
|
313 |
|
|
|
314 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set color for text. Use SetColor() to specify border colro and SetFillColor() to set fill color. <br>
|
|
|
315 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETCOLOR">CanvasRectangleText::SetColor</a> and <a href="CanvasRectangleText.html#_CANVASRECTANGLETEXT_SETFILLCOLOR">CanvasRectangleText::SetFillColor</a>
|
|
|
316 |
<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">
|
|
|
317 |
|
|
|
318 |
</span><br>
|
|
|
319 |
|
|
|
320 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_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">
|
|
|
321 |
function SetPos($xl,$yt,$w,$h)</font>
|
|
|
322 |
</b></div></a></span>
|
|
|
323 |
|
|
|
324 |
<span style='font-family:arial;font-size:90%;'><i>Specify position</i></span><p>
|
|
|
325 |
|
|
|
326 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
327 |
|
|
|
328 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
329 |
|
|
|
330 |
|
|
|
331 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
332 |
0</font>
|
|
|
333 |
</td><td>Top left X</td></tr>
|
|
|
334 |
|
|
|
335 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
336 |
$yt</font>
|
|
|
337 |
|
|
|
338 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
339 |
0</font>
|
|
|
340 |
</td><td>Top left Y</td></tr>
|
|
|
341 |
|
|
|
342 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
343 |
$w</font>
|
|
|
344 |
|
|
|
345 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
346 |
0</font>
|
|
|
347 |
|
|
|
348 |
|
|
|
349 |
|
|
|
350 |
$h</font>
|
|
|
351 |
|
|
|
352 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
353 |
0</font>
|
|
|
354 |
|
|
|
355 |
</table>
|
|
|
356 |
|
|
|
357 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify position. All coordinates will be transalted with the specified scale when stroked. <br>
|
|
|
358 |
|
|
|
359 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_SETSHADOW"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
360 |
function SetShadow($aColor,$aWidth)</font>
|
|
|
361 |
|
|
|
362 |
|
|
|
363 |
<span style='font-family:arial;font-size:90%;'><i>Add a drop shadow</i></span><p>
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
367 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
368 |
|
|
|
369 |
|
|
|
370 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
371 |
'gray'</font>
|
|
|
372 |
|
|
|
373 |
|
|
|
374 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
375 |
|
|
|
376 |
|
|
|
377 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
378 |
3</font>
|
|
|
379 |
</td><td>Width of shadow</td></tr>
|
|
|
380 |
|
|
|
381 |
|
|
|
382 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Add a drop shadow to the rounded reactangle surranding the text <br>
|
|
|
383 |
|
|
|
384 |
<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">
|
|
|
385 |
$t->SetShadow(); // Use default values
<br /></font>
|
|
|
386 |
|
|
|
387 |
<p>
|
|
|
388 |
|
|
|
389 |
function SetTxt($aTxt)</font>
|
|
|
390 |
</b></div></a></span>
|
|
|
391 |
|
|
|
392 |
<span style='font-family:arial;font-size:90%;'><i>Specify text string</i></span><p>
|
|
|
393 |
|
|
|
394 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
395 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
396 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
397 |
|
|
|
398 |
|
|
|
399 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Textt</td></tr>
|
|
|
400 |
|
|
|
401 |
|
|
|
402 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set text string to be displayed. The text string may have multiple lines separated by a newline character "\n" <br>
|
|
|
403 |
|
|
|
404 |
<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">
|
|
|
405 |
|
|
|
406 |
</span><br>
|
|
|
407 |
|
|
|
408 |
<p> <p> <span style='font-size:110%;'><a name="_CANVASRECTANGLETEXT_STROKE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
|
409 |
function Stroke($aImg,$scale)</font>
|
|
|
410 |
</b></div></a></span>
|
|
|
411 |
|
|
|
412 |
<span style='font-family:arial;font-size:90%;'><i>Stroke text to canvas</i></span><p>
|
|
|
413 |
|
|
|
414 |
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
|
415 |
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
|
416 |
|
|
|
417 |
$aImg</font>
|
|
|
418 |
|
|
|
419 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Image context</td></tr>
|
|
|
420 |
|
|
|
421 |
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
|
422 |
$scale</font>
|
|
|
423 |
|
|
|
424 |
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Scale</td></tr>
|
|
|
425 |
</table>
|
|
|
426 |
|
|
|
427 |
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Stroke text to canvas <br>
|
|
|
428 |
|
|
|
429 |
<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">
|
|
|
430 |
$t->Stroke($graph->img,$scale);
<br /></font>
|
|
|
431 |
</span><br>
|
|
|
432 |
<p> <hr> <p>
|