60 |
jpm |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>Documentation</title>
|
|
|
4 |
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
|
|
5 |
<link rel='stylesheet' href='style.css' />
|
|
|
6 |
</head>
|
|
|
7 |
|
|
|
8 |
<body>
|
|
|
9 |
<div align='center'>
|
|
|
10 |
<table cellpadding='0' cellspacing='0' id='contenu' class='round' style='width: 80%; margin-bottom: 20px'>
|
|
|
11 |
<tr>
|
|
|
12 |
<td class='borderhg'> </td>
|
|
|
13 |
<td class='borderh'> </td>
|
|
|
14 |
<td class='cornerhd'></td>
|
|
|
15 |
</tr>
|
|
|
16 |
<tr>
|
|
|
17 |
<td class='borderg'> </td>
|
|
|
18 |
<td><a id="top"></a><h2> Class Label</h2><div class="description">
|
|
|
19 |
<p>
|
|
|
20 |
La classe <a href="Label.html">Label</a> permet de créer et d'afficher des étiquettes de texte sur des images.
|
|
|
21 |
</p>
|
|
|
22 |
</div><ul class="links"><li><a href="index.html">Retourner voir la liste de toutes les classes</a></li></ul><h2>Méthodes et propriétés</h2><ul class="properties">
|
|
|
23 |
<li>
|
|
|
24 |
<span class="access">public</span> <a href="Border.html"><span class="type">Border</span></a> <a href="Label.html#property.border"><span class="argument">$border</span></a> := <span class="default">new Border</span>
|
|
|
25 |
</li>
|
|
|
26 |
<li>
|
|
|
27 |
<span class="access">protected</span> <a href="Font.html"><span class="type">Font</span></a> <a href="Label.html#property.font"><span class="argument">$font</span></a> := <span class="default">new Font(Font::FONT_2)</span>
|
|
|
28 |
</li>
|
|
|
29 |
<li>
|
|
|
30 |
<span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.angle"><span class="argument">$angle</span></a> := <span class="default">0</span>
|
|
|
31 |
</li>
|
|
|
32 |
<li>
|
|
|
33 |
<span class="access">protected</span> <a href="Color.html"><span class="type">Color</span></a> <a href="Label.html#property.color"><span class="argument">$color</span></a> := <span class="default">new Color(0, 0, 0)</span>
|
|
|
34 |
</li>
|
|
|
35 |
<li>
|
|
|
36 |
<span class="access">protected</span> <span class="type">bool</span> <a href="Label.html#property.hide"><span class="argument">$hide</span></a>
|
|
|
37 |
</li>
|
|
|
38 |
<li>
|
|
|
39 |
<span class="access">protected</span> <span class="type">bool</span> <a href="Label.html#property.hideFirst"><span class="argument">$hideFirst</span></a>
|
|
|
40 |
</li>
|
|
|
41 |
<li>
|
|
|
42 |
<span class="access">protected</span> <span class="type">bool</span> <a href="Label.html#property.hideLast"><span class="argument">$hideLast</span></a>
|
|
|
43 |
</li>
|
|
|
44 |
<li>
|
|
|
45 |
<span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.interval"><span class="argument">$interval</span></a>
|
|
|
46 |
</li>
|
|
|
47 |
<li>
|
|
|
48 |
<span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.hAlign"><span class="argument">$hAlign</span></a> := <span class="default">Label::CENTER</span>
|
|
|
49 |
</li>
|
|
|
50 |
<li>
|
|
|
51 |
<span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.vAlign"><span class="argument">$vAlign</span></a> := <span class="default">Label::MIDDLE</span>
|
|
|
52 |
</li>
|
|
|
53 |
</ul><ul class="methods">
|
|
|
54 |
<li>
|
|
|
55 |
<span class="access">public</span> <a href="Label.html#method.__construct">__construct</a>(<span class="type">string</span> <span class="argument">$label</span> := <span class="default">NULL</span>, <a href="Font.html"><span class="type">Font</span></a> <span class="argument">$font</span> := <span class="default">new Font(Text::FONT_2)</span>, <a href="color.html"><span class="type">color</span></a> <span class="argument">$color</span> := <span class="default">new Color(0, 0, 0)</span>, <span class="type">int</span> <span class="argument">$angle</span> := <span class="default">0</span>)
|
|
|
56 |
</li>
|
|
|
57 |
<li>
|
|
|
58 |
<span class="access">public</span> <span class="type">mixed</span> <a href="Label.html#method.get">get</a>(<span class="type">int</span> <span class="argument">$key</span>)
|
|
|
59 |
</li>
|
|
|
60 |
<li>
|
|
|
61 |
<span class="access">public</span> <span class="type">mixed</span> <a href="Label.html#method.all">all</a>()
|
|
|
62 |
</li>
|
|
|
63 |
<li>
|
|
|
64 |
<span class="access">public</span> <a href="Label.html#method.set">set</a>(<span class="type">mixed</span> <span class="argument">$labels</span>)
|
|
|
65 |
</li>
|
|
|
66 |
<li>
|
|
|
67 |
<span class="access">public</span> <span class="type">int</span> <a href="Label.html#method.count">count</a>()
|
|
|
68 |
</li>
|
|
|
69 |
<li>
|
|
|
70 |
<span class="access">public</span> <a href="Label.html#method.setCallbackFunction">setCallbackFunction</a>(<span class="type">mixed</span> <span class="argument">$function</span>)
|
|
|
71 |
</li>
|
|
|
72 |
<li>
|
|
|
73 |
<span class="access">public</span> <span class="type">string</span> <a href="Label.html#method.getCallbackFunction">getCallbackFunction</a>()
|
|
|
74 |
</li>
|
|
|
75 |
<li>
|
|
|
76 |
<span class="access">public</span> <a href="Label.html#method.setFormat">setFormat</a>(<span class="type">string</span> <span class="argument">$format</span>)
|
|
|
77 |
</li>
|
|
|
78 |
<li>
|
|
|
79 |
<span class="access">public</span> <a href="Label.html#method.setFont">setFont</a>(<a href="Font.html"><span class="type">Font</span></a> <span class="argument">$font</span>)
|
|
|
80 |
</li>
|
|
|
81 |
<li>
|
|
|
82 |
<span class="access">public</span> <a href="Label.html#method.setAngle">setAngle</a>(<span class="type">int</span> <span class="argument">$angle</span>)
|
|
|
83 |
</li>
|
|
|
84 |
<li>
|
|
|
85 |
<span class="access">public</span> <a href="Label.html#method.setColor">setColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
86 |
</li>
|
|
|
87 |
<li>
|
|
|
88 |
<span class="access">public</span> <a href="Label.html#method.setBackground">setBackground</a>(<span class="type">mixed</span> <span class="argument">$background</span>)
|
|
|
89 |
</li>
|
|
|
90 |
<li>
|
|
|
91 |
<span class="access">public</span> <a href="Label.html#method.setBackgroundColor">setBackgroundColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
92 |
</li>
|
|
|
93 |
<li>
|
|
|
94 |
<span class="access">public</span> <a href="Label.html#method.setBackgroundGradient">setBackgroundGradient</a>(<a href="Gradient.html"><span class="type">Gradient</span></a> <span class="argument">$gradient</span>)
|
|
|
95 |
</li>
|
|
|
96 |
<li>
|
|
|
97 |
<span class="access">public</span> <a href="Label.html#method.setPadding">setPadding</a>(<span class="type">int</span> <span class="argument">$left</span>, <span class="type">int</span> <span class="argument">$right</span>, <span class="type">int</span> <span class="argument">$top</span>, <span class="type">int</span> <span class="argument">$bottom</span>)
|
|
|
98 |
</li>
|
|
|
99 |
<li>
|
|
|
100 |
<span class="access">public</span> <a href="Label.html#method.hide">hide</a>(<span class="type">bool</span> <span class="argument">$hide</span>)
|
|
|
101 |
</li>
|
|
|
102 |
<li>
|
|
|
103 |
<span class="access">public</span> <a href="Label.html#method.show">show</a>(<span class="type">bool</span> <span class="argument">$show</span>)
|
|
|
104 |
</li>
|
|
|
105 |
<li>
|
|
|
106 |
<span class="access">public</span> <a href="Label.html#method.hideKey">hideKey</a>(<span class="type">int</span> <span class="argument">$key</span>)
|
|
|
107 |
</li>
|
|
|
108 |
<li>
|
|
|
109 |
<span class="access">public</span> <a href="Label.html#method.hideFirst">hideFirst</a>(<span class="type">bool</span> <span class="argument">$hide</span>)
|
|
|
110 |
</li>
|
|
|
111 |
<li>
|
|
|
112 |
<span class="access">public</span> <a href="Label.html#method.hideLast">hideLast</a>(<span class="type">bool</span> <span class="argument">$hide</span>)
|
|
|
113 |
</li>
|
|
|
114 |
<li>
|
|
|
115 |
<span class="access">public</span> <a href="Label.html#method.setInterval">setInterval</a>(<span class="type">int</span> <span class="argument">$interval</span>)
|
|
|
116 |
</li>
|
|
|
117 |
<li>
|
|
|
118 |
<span class="access">public</span> <a href="Label.html#method.move">move</a>(<span class="type">int</span> <span class="argument">$x</span>, <span class="type">int</span> <span class="argument">$y</span>)
|
|
|
119 |
</li>
|
|
|
120 |
<li>
|
|
|
121 |
<span class="access">public</span> <a href="Label.html#method.setAlign">setAlign</a>(<span class="type">int</span> <span class="argument">$h</span> := <span class="default">NULL</span>, <span class="type">int</span> <span class="argument">$v</span> := <span class="default">NULL</span>)
|
|
|
122 |
</li>
|
|
|
123 |
<li>
|
|
|
124 |
<span class="access">public</span> <a href="Text.html"><span class="type">Text</span></a> <a href="Label.html#method.getText">getText</a>(<span class="type">int</span> <span class="argument">$key</span>)
|
|
|
125 |
</li>
|
|
|
126 |
<li>
|
|
|
127 |
<span class="access">public</span> <span class="type">int</span> <a href="Label.html#method.getMaxWidth">getMaxWidth</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>)
|
|
|
128 |
</li>
|
|
|
129 |
<li>
|
|
|
130 |
<span class="access">public</span> <span class="type">int</span> <a href="Label.html#method.getMaxHeight">getMaxHeight</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>)
|
|
|
131 |
</li>
|
|
|
132 |
<li>
|
|
|
133 |
<span class="access">public</span> <a href="Label.html#method.draw">draw</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>, <a href="Point.html"><span class="type">Point</span></a> <span class="argument">$point</span>, <span class="type">int</span> <span class="argument">$key</span> := <span class="default">0</span>)
|
|
|
134 |
</li>
|
|
|
135 |
</ul><h2>Documentation</h2><ul class="doc">
|
|
|
136 |
<li class="property">
|
|
|
137 |
<a id="property.border"></a><span class="access">public</span> <a href="Border.html"><span class="type">Border</span></a> <a href="Label.html#property.border"><span class="argument">$border</span></a> := <span class="default">new Border</span><div class="description">
|
|
|
138 |
La bordure associée à l'étiquette.
|
|
|
139 |
</div>
|
|
|
140 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
141 |
</li>
|
|
|
142 |
<li class="property">
|
|
|
143 |
<a id="property.font"></a><span class="access">protected</span> <a href="Font.html"><span class="type">Font</span></a> <a href="Label.html#property.font"><span class="argument">$font</span></a> := <span class="default">new Font(Font::FONT_2)</span><div class="description">
|
|
|
144 |
La police utilisée pour ce paragraphe.
|
|
|
145 |
</div>
|
|
|
146 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
147 |
</li>
|
|
|
148 |
<li class="property">
|
|
|
149 |
<a id="property.angle"></a><span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.angle"><span class="argument">$angle</span></a> := <span class="default">0</span><div class="description">
|
|
|
150 |
L'angle du texte du paragraphe.
|
|
|
151 |
</div>
|
|
|
152 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
153 |
</li>
|
|
|
154 |
<li class="property">
|
|
|
155 |
<a id="property.color"></a><span class="access">protected</span> <a href="Color.html"><span class="type">Color</span></a> <a href="Label.html#property.color"><span class="argument">$color</span></a> := <span class="default">new Color(0, 0, 0)</span><div class="description">
|
|
|
156 |
La couleur du texte du paragraphe.
|
|
|
157 |
</div>
|
|
|
158 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
159 |
</li>
|
|
|
160 |
<li class="property">
|
|
|
161 |
<a id="property.hide"></a><span class="access">protected</span> <span class="type">bool</span> <a href="Label.html#property.hide"><span class="argument">$hide</span></a><div class="description">
|
|
|
162 |
Détermine si les étiquettes doivent être cachées.
|
|
|
163 |
</div>
|
|
|
164 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
165 |
</li>
|
|
|
166 |
<li class="property">
|
|
|
167 |
<a id="property.hideFirst"></a><span class="access">protected</span> <span class="type">bool</span> <a href="Label.html#property.hideFirst"><span class="argument">$hideFirst</span></a><div class="description">
|
|
|
168 |
Détermine si la première étiquette doit être cachée.
|
|
|
169 |
</div>
|
|
|
170 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
171 |
</li>
|
|
|
172 |
<li class="property">
|
|
|
173 |
<a id="property.hideLast"></a><span class="access">protected</span> <span class="type">bool</span> <a href="Label.html#property.hideLast"><span class="argument">$hideLast</span></a><div class="description">
|
|
|
174 |
Détermine si la dernière étiquette doit être cachée.
|
|
|
175 |
</div>
|
|
|
176 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
177 |
</li>
|
|
|
178 |
<li class="property">
|
|
|
179 |
<a id="property.interval"></a><span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.interval"><span class="argument">$interval</span></a><div class="description">
|
|
|
180 |
L'interval d'affichage des étiquettes.
|
|
|
181 |
</div>
|
|
|
182 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
183 |
</li>
|
|
|
184 |
<li class="property">
|
|
|
185 |
<a id="property.hAlign"></a><span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.hAlign"><span class="argument">$hAlign</span></a> := <span class="default">Label::CENTER</span><div class="description">
|
|
|
186 |
L'alignement horizontal des étiquettes.
|
|
|
187 |
</div>
|
|
|
188 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
189 |
</li>
|
|
|
190 |
<li class="property">
|
|
|
191 |
<a id="property.vAlign"></a><span class="access">protected</span> <span class="type">int</span> <a href="Label.html#property.vAlign"><span class="argument">$vAlign</span></a> := <span class="default">Label::MIDDLE</span><div class="description">
|
|
|
192 |
L'alignement vertical des étiquettes.
|
|
|
193 |
</div>
|
|
|
194 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
195 |
</li>
|
|
|
196 |
<li class="method">
|
|
|
197 |
<a id="method.__construct"></a><span class="access">public</span> <a href="Label.html#method.__construct">__construct</a>(<span class="type">string</span> <span class="argument">$label</span> := <span class="default">NULL</span>, <a href="Font.html"><span class="type">Font</span></a> <span class="argument">$font</span> := <span class="default">new Font(Text::FONT_2)</span>, <a href="color.html"><span class="type">color</span></a> <span class="argument">$color</span> := <span class="default">new Color(0, 0, 0)</span>, <span class="type">int</span> <span class="argument">$angle</span> := <span class="default">0</span>)
|
|
|
198 |
<div class="description">
|
|
|
199 |
Construit un nouvel objet qui permettra l'affichage d'étiquettes sur une image.
|
|
|
200 |
$label est un chaîne de caractères qui représente la première étiquette (peut être laissée à NULL).
|
|
|
201 |
$font est la police à utiliser pour l'étiquette tandis que $color sera utilisé pour la couleur du texte.
|
|
|
202 |
Enfin, l'angle du texte prendra la valeur de $angle.
|
|
|
203 |
</div>
|
|
|
204 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
205 |
</li>
|
|
|
206 |
<li class="method">
|
|
|
207 |
<a id="method.get"></a><span class="access">public</span> <span class="type">mixed</span> <a href="Label.html#method.get">get</a>(<span class="type">int</span> <span class="argument">$key</span>)
|
|
|
208 |
<div class="description">
|
|
|
209 |
Retourne la valeur de l'élément de l'étiquette dont la clé vaut $key.
|
|
|
210 |
Si la clé n'est associée à aucune valeur, alors cette méthode retourne NULL.
|
|
|
211 |
</div>
|
|
|
212 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
213 |
</li>
|
|
|
214 |
<li class="method">
|
|
|
215 |
<a id="method.all"></a><span class="access">public</span> <span class="type">mixed</span> <a href="Label.html#method.all">all</a>()
|
|
|
216 |
<div class="description">
|
|
|
217 |
Retourne toutes la valeur de toutes les étiquettes sous la forme d'un tableau.
|
|
|
218 |
</div>
|
|
|
219 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
220 |
</li>
|
|
|
221 |
<li class="method">
|
|
|
222 |
<a id="method.set"></a><span class="access">public</span> <a href="Label.html#method.set">set</a>(<span class="type">mixed</span> <span class="argument">$labels</span>)
|
|
|
223 |
<div class="description">
|
|
|
224 |
Change le texte des étiquettes à afficher sur l'image.
|
|
|
225 |
$labels peut être une chaîne de caractères si vous n'avez besoin que d'une étiquette, ou un tableau de chaînes de caractères si vous avez besoin de plusieurs étiquettes.
|
|
|
226 |
</div>
|
|
|
227 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
228 |
</li>
|
|
|
229 |
<li class="method">
|
|
|
230 |
<a id="method.count"></a><span class="access">public</span> <span class="type">int</span> <a href="Label.html#method.count">count</a>()
|
|
|
231 |
<div class="description">
|
|
|
232 |
Retourne le nombre de textes dans le paragraphe.
|
|
|
233 |
</div>
|
|
|
234 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
235 |
</li>
|
|
|
236 |
<li class="method">
|
|
|
237 |
<a id="method.setCallbackFunction"></a><span class="access">public</span> <a href="Label.html#method.setCallbackFunction">setCallbackFunction</a>(<span class="type">mixed</span> <span class="argument">$function</span>)
|
|
|
238 |
<div class="description">
|
|
|
239 |
Change le nom de la fonction de callback qui sera appelé lors du dessin des textes du paragraphe. $function peut être une simple chaîne de caractères, ou un tableau du type <span style="font-style: italic;">array($this, 'methodName')</span> pour permettre d'appeler des méthodes statiques.
|
|
|
240 |
</div>
|
|
|
241 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
242 |
</li>
|
|
|
243 |
<li class="method">
|
|
|
244 |
<a id="method.getCallbackFunction"></a><span class="access">public</span> <span class="type">string</span> <a href="Label.html#method.getCallbackFunction">getCallbackFunction</a>()
|
|
|
245 |
<div class="description">
|
|
|
246 |
Retourne le nom de la fonction de callback actuellement utilisée.
|
|
|
247 |
Si aucune fonction de callback n'a été spécifiée, alors NULL sera retourné.
|
|
|
248 |
</div>
|
|
|
249 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
250 |
</li>
|
|
|
251 |
<li class="method">
|
|
|
252 |
<a id="method.setFormat"></a><span class="access">public</span> <a href="Label.html#method.setFormat">setFormat</a>(<span class="type">string</span> <span class="argument">$format</span>)
|
|
|
253 |
<div class="description">
|
|
|
254 |
Formate le texte de chaque étiquette selon $format.
|
|
|
255 |
$format est du même format que les fonctions printf ou sprintf.
|
|
|
256 |
</div>
|
|
|
257 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
258 |
</li>
|
|
|
259 |
<li class="method">
|
|
|
260 |
<a id="method.setFont"></a><span class="access">public</span> <a href="Label.html#method.setFont">setFont</a>(<a href="Font.html"><span class="type">Font</span></a> <span class="argument">$font</span>)
|
|
|
261 |
<div class="description">
|
|
|
262 |
Change la police utilisée pour le texte de l'étiquette.
|
|
|
263 |
</div>
|
|
|
264 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
265 |
</li>
|
|
|
266 |
<li class="method">
|
|
|
267 |
<a id="method.setAngle"></a><span class="access">public</span> <a href="Label.html#method.setAngle">setAngle</a>(<span class="type">int</span> <span class="argument">$angle</span>)
|
|
|
268 |
<div class="description">
|
|
|
269 |
Change l'angle du texte de l'étiquette. Les valeurs possibles sont 0 ou 90°.
|
|
|
270 |
</div>
|
|
|
271 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
272 |
</li>
|
|
|
273 |
<li class="method">
|
|
|
274 |
<a id="method.setColor"></a><span class="access">public</span> <a href="Label.html#method.setColor">setColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
275 |
<div class="description">
|
|
|
276 |
Change la couleur du texte de l'étiquette.
|
|
|
277 |
</div>
|
|
|
278 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
279 |
</li>
|
|
|
280 |
<li class="method">
|
|
|
281 |
<a id="method.setBackground"></a><span class="access">public</span> <a href="Label.html#method.setBackground">setBackground</a>(<span class="type">mixed</span> <span class="argument">$background</span>)
|
|
|
282 |
<div class="description">
|
|
|
283 |
Change le fond du texte de l'étiquette.
|
|
|
284 |
$background peut être soit une couleur, soit un dégradé;
|
|
|
285 |
</div>
|
|
|
286 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
287 |
</li>
|
|
|
288 |
<li class="method">
|
|
|
289 |
<a id="method.setBackgroundColor"></a><span class="access">public</span> <a href="Label.html#method.setBackgroundColor">setBackgroundColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
290 |
<div class="description">
|
|
|
291 |
Change la couleur de fond du texte de l'étiquette.
|
|
|
292 |
<div class="see">
|
|
|
293 |
Voir aussi :
|
|
|
294 |
<ul><li><a href="Label.html#method.setBackground">Label::setBackground()</a></li></ul>
|
|
|
295 |
</div>
|
|
|
296 |
</div>
|
|
|
297 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
298 |
</li>
|
|
|
299 |
<li class="method">
|
|
|
300 |
<a id="method.setBackgroundGradient"></a><span class="access">public</span> <a href="Label.html#method.setBackgroundGradient">setBackgroundGradient</a>(<a href="Gradient.html"><span class="type">Gradient</span></a> <span class="argument">$gradient</span>)
|
|
|
301 |
<div class="description">
|
|
|
302 |
Change le dégradé de fond du texte de l'étiquette.
|
|
|
303 |
<div class="see">
|
|
|
304 |
Voir aussi :
|
|
|
305 |
<ul><li><a href="Label.html#method.setBackground">Label::setBackground()</a></li></ul>
|
|
|
306 |
</div>
|
|
|
307 |
</div>
|
|
|
308 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
309 |
</li>
|
|
|
310 |
<li class="method">
|
|
|
311 |
<a id="method.setPadding"></a><span class="access">public</span> <a href="Label.html#method.setPadding">setPadding</a>(<span class="type">int</span> <span class="argument">$left</span>, <span class="type">int</span> <span class="argument">$right</span>, <span class="type">int</span> <span class="argument">$top</span>, <span class="type">int</span> <span class="argument">$bottom</span>)
|
|
|
312 |
<div class="description">
|
|
|
313 |
Change la valeur de l'espace qui entoure le texte par rapport à sa bordure.
|
|
|
314 |
</div>
|
|
|
315 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
316 |
</li>
|
|
|
317 |
<li class="method">
|
|
|
318 |
<a id="method.hide"></a><span class="access">public</span> <a href="Label.html#method.hide">hide</a>(<span class="type">bool</span> <span class="argument">$hide</span>)
|
|
|
319 |
<div class="description">
|
|
|
320 |
Détermine si toutes les étiquettes doivent être cachées ou non.
|
|
|
321 |
</div>
|
|
|
322 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
323 |
</li>
|
|
|
324 |
<li class="method">
|
|
|
325 |
<a id="method.show"></a><span class="access">public</span> <a href="Label.html#method.show">show</a>(<span class="type">bool</span> <span class="argument">$show</span>)
|
|
|
326 |
<div class="description">
|
|
|
327 |
Détermine si toutes les étiquettes doivent être affichées ou non.
|
|
|
328 |
</div>
|
|
|
329 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
330 |
</li>
|
|
|
331 |
<li class="method">
|
|
|
332 |
<a id="method.hideKey"></a><span class="access">public</span> <a href="Label.html#method.hideKey">hideKey</a>(<span class="type">int</span> <span class="argument">$key</span>)
|
|
|
333 |
<div class="description">
|
|
|
334 |
Détermine si l'étiquette de clé $key doit être cachée ou non.
|
|
|
335 |
</div>
|
|
|
336 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
337 |
</li>
|
|
|
338 |
<li class="method">
|
|
|
339 |
<a id="method.hideFirst"></a><span class="access">public</span> <a href="Label.html#method.hideFirst">hideFirst</a>(<span class="type">bool</span> <span class="argument">$hide</span>)
|
|
|
340 |
<div class="description">
|
|
|
341 |
Détermine si la première étiquette doit être cachée ou non.
|
|
|
342 |
</div>
|
|
|
343 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
344 |
</li>
|
|
|
345 |
<li class="method">
|
|
|
346 |
<a id="method.hideLast"></a><span class="access">public</span> <a href="Label.html#method.hideLast">hideLast</a>(<span class="type">bool</span> <span class="argument">$hide</span>)
|
|
|
347 |
<div class="description">
|
|
|
348 |
Détermine si la dernière étiquette doit être cachée ou non.
|
|
|
349 |
</div>
|
|
|
350 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
351 |
</li>
|
|
|
352 |
<li class="method">
|
|
|
353 |
<a id="method.setInterval"></a><span class="access">public</span> <a href="Label.html#method.setInterval">setInterval</a>(<span class="type">int</span> <span class="argument">$interval</span>)
|
|
|
354 |
<div class="description">
|
|
|
355 |
Change l'interval d'affichage des étiquettes.
|
|
|
356 |
L'interval est à 1 par défaut, ce qui signifie que toutes les étiquettes sont affichées.
|
|
|
357 |
Si cet interval est placé à 2 par exemple, alors la méthode <a href="Label.html#method.draw">draw()</a> n'affichera qu'une étiquette sur 2.
|
|
|
358 |
</div>
|
|
|
359 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
360 |
</li>
|
|
|
361 |
<li class="method">
|
|
|
362 |
<a id="method.move"></a><span class="access">public</span> <a href="Label.html#method.move">move</a>(<span class="type">int</span> <span class="argument">$x</span>, <span class="type">int</span> <span class="argument">$y</span>)
|
|
|
363 |
<div class="description">
|
|
|
364 |
Déplace l'affichage de l'étiquette de $x pixels sur l'axe des abscisses et de $y pixels sur l'axe des ordonnées.
|
|
|
365 |
Les appels à <a href="Label.html#method.move">move()</a> sont cumulés, c'est-à-dire qu'un appel avec de nouvelles valeurs additionnera ces valeurs avec les anciennes.
|
|
|
366 |
Par défaut, $x et $y sont à 0.
|
|
|
367 |
</div>
|
|
|
368 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
369 |
</li>
|
|
|
370 |
<li class="method">
|
|
|
371 |
<a id="method.setAlign"></a><span class="access">public</span> <a href="Label.html#method.setAlign">setAlign</a>(<span class="type">int</span> <span class="argument">$h</span> := <span class="default">NULL</span>, <span class="type">int</span> <span class="argument">$v</span> := <span class="default">NULL</span>)
|
|
|
372 |
<div class="description">
|
|
|
373 |
Change l'alignement de l'étiquette par rapport au point où elle sera affichée.
|
|
|
374 |
$h correspond à l'alignement horizontal (<a href="Label.html#constant.LEFT">Positionable::LEFT</a>, <a href="Label.html#constant.RIGHT">Positionable::RIGHT</a> ou <a href="Label.html#constant.CENTER">Positionable::CENTER</a>) et $v à l'alignement vertical (<a href="Label.html#constant.TOP">Positionable::TOP</a>, <a href="Label.html#constant.BOTTOM">Positionable::BOTTOM</a> ou <a href="Label.html#constant.MIDDLE">Positionable::MIDDLE</a>).
|
|
|
375 |
Si vous ne souhaitez pas modifier une des deux valeurs, vous pouvez passer NULL.
|
|
|
376 |
</div>
|
|
|
377 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
378 |
</li>
|
|
|
379 |
<li class="method">
|
|
|
380 |
<a id="method.getText"></a><span class="access">public</span> <a href="Text.html"><span class="type">Text</span></a> <a href="Label.html#method.getText">getText</a>(<span class="type">int</span> <span class="argument">$key</span>)
|
|
|
381 |
<div class="description">
|
|
|
382 |
Retourne un objet de type <a href="Text.html">Text</a> qui correspond à la valeur du tableau de textes passé au constructeur ou à <a href="Label.html#method.set">Label::set()</a> pour la clé $key.
|
|
|
383 |
Cette object <a href="Text.html">Text</a> se verra attribué toutes les propriétés (couleur, police, angle, etc.) définies pour le paragraphe.
|
|
|
384 |
</div>
|
|
|
385 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
386 |
</li>
|
|
|
387 |
<li class="method">
|
|
|
388 |
<a id="method.getMaxWidth"></a><span class="access">public</span> <span class="type">int</span> <a href="Label.html#method.getMaxWidth">getMaxWidth</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>)
|
|
|
389 |
<div class="description">
|
|
|
390 |
Essaie de déterminer la longueur maximale des étiquettes. Cette méthode a besoin d'un <a href="Driver.html">Driver</a> pour établir la taille de chaque texte.
|
|
|
391 |
La longueur maximale trouvée est déterminée et rétournée en pixels.
|
|
|
392 |
</div>
|
|
|
393 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
394 |
</li>
|
|
|
395 |
<li class="method">
|
|
|
396 |
<a id="method.getMaxHeight"></a><span class="access">public</span> <span class="type">int</span> <a href="Label.html#method.getMaxHeight">getMaxHeight</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>)
|
|
|
397 |
<div class="description">
|
|
|
398 |
Essaie de déterminer la hauteur maximale des étiquettes. Cette méthode a besoin d'un <a href="Driver.html">Driver</a> pour établir la taille de chaque texte.
|
|
|
399 |
La hauteur maximale trouvée est déterminée et rétournée en pixels.
|
|
|
400 |
</div>
|
|
|
401 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
402 |
</li>
|
|
|
403 |
<li class="method">
|
|
|
404 |
<a id="method.draw"></a><span class="access">public</span> <a href="Label.html#method.draw">draw</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>, <a href="Point.html"><span class="type">Point</span></a> <span class="argument">$point</span>, <span class="type">int</span> <span class="argument">$key</span> := <span class="default">0</span>)
|
|
|
405 |
<div class="description">
|
|
|
406 |
Dessine l'étiquette identifiée par $key avec le pilote $driver. L'étiquette sera placée au point $point décalé des valeurs successivement passées à <a href="Label.html#method.move">move()</a>, et alignée par rapport à ce point selon les valeurs passées à <a href="Label.html#method.setAlign">setAlign()</a>.
|
|
|
407 |
L'étiquette ne sera pas affichée si sa clé $key n'est pas dans l'interval d'affichage donné avec <a href="Label.html#method.setInterval">setInterval()</a>.
|
|
|
408 |
</div>
|
|
|
409 |
<div class="description-bottom"><a href="Label.html#top">Remonter</a></div>
|
|
|
410 |
</li>
|
|
|
411 |
</ul>
|
|
|
412 |
</td>
|
|
|
413 |
<td class='borderd'> </td>
|
|
|
414 |
</tr>
|
|
|
415 |
<tr>
|
|
|
416 |
<td class='cornerbg'></td>
|
|
|
417 |
<td class='borderb'> </td>
|
|
|
418 |
<td class='cornerbd'></td>
|
|
|
419 |
</tr>
|
|
|
420 |
</table>
|
|
|
421 |
</div>
|
|
|
422 |
</body>
|
|
|
423 |
</html>
|