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 Grid</h2><div class="description">
|
|
|
19 |
<p>
|
|
|
20 |
La classe <a href="Grid.html">Grid</a> permet de manipuler des grilles de fond sur les <a href="Plot.html">Plot</a> ou <a href="PlotGroup.html">groupes de Plot</a>.
|
|
|
21 |
Une grille facilite la lecture des données pour l'utilisateur.
|
|
|
22 |
Un exemple de grille est montré ci-dessous.
|
|
|
23 |
</p>
|
|
|
24 |
<div class="image">
|
|
|
25 |
<img src="image/grid.png">
|
|
|
26 |
</div>
|
|
|
27 |
</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="methods">
|
|
|
28 |
<li>
|
|
|
29 |
<span class="access">public</span> <a href="Grid.html#method.__construct">__construct</a>()
|
|
|
30 |
</li>
|
|
|
31 |
<li>
|
|
|
32 |
<span class="access">public</span> <a href="Grid.html#method.hide">hide</a>(<span class="type">bool</span> <span class="argument">$hide</span> := <span class="default">TRUE</span>)
|
|
|
33 |
</li>
|
|
|
34 |
<li>
|
|
|
35 |
<span class="access">public</span> <a href="Grid.html#method.hideHorizontal">hideHorizontal</a>(<span class="type">bool</span> <span class="argument">$hide</span> := <span class="default">TRUE</span>)
|
|
|
36 |
</li>
|
|
|
37 |
<li>
|
|
|
38 |
<span class="access">public</span> <a href="Grid.html#method.hideVertical">hideVertical</a>(<span class="type">bool</span> <span class="argument">$hide</span> := <span class="default">TRUE</span>)
|
|
|
39 |
</li>
|
|
|
40 |
<li>
|
|
|
41 |
<span class="access">public</span> <a href="Grid.html#method.setColor">setColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
42 |
</li>
|
|
|
43 |
<li>
|
|
|
44 |
<span class="access">public</span> <a href="Grid.html#method.setBackgroundColor">setBackgroundColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
45 |
</li>
|
|
|
46 |
<li>
|
|
|
47 |
<span class="access">public</span> <a href="Grid.html#method.setType">setType</a>(<span class="type">int</span> <span class="argument">$type</span>)
|
|
|
48 |
</li>
|
|
|
49 |
<li>
|
|
|
50 |
<span class="access">public</span> <a href="Grid.html#method.setInterval">setInterval</a>(<span class="type">int</span> <span class="argument">$hInterval</span>, <span class="type">int</span> <span class="argument">$vInterval</span>)
|
|
|
51 |
</li>
|
|
|
52 |
<li>
|
|
|
53 |
<span class="access">public</span> <a href="Grid.html#method.setSpace">setSpace</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>)
|
|
|
54 |
</li>
|
|
|
55 |
<li>
|
|
|
56 |
<span class="access">public</span> <a href="Grid.html#method.setGrid">setGrid</a>(<span class="type">array</span> <span class="argument">$xgrid</span>, <span class="type">array</span> <span class="argument">$ygrid</span>)
|
|
|
57 |
</li>
|
|
|
58 |
<li>
|
|
|
59 |
<span class="access">public</span> <a href="Grid.html#method.draw">draw</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>, <span class="type">int</span> <span class="argument">$x1</span>, <span class="type">int</span> <span class="argument">$y1</span>, <span class="type">int</span> <span class="argument">$x2</span>, <span class="type">int</span> <span class="argument">$y2</span>)
|
|
|
60 |
</li>
|
|
|
61 |
</ul><h2>Documentation</h2><ul class="doc">
|
|
|
62 |
<li class="method">
|
|
|
63 |
<a id="method.__construct"></a><span class="access">public</span> <a href="Grid.html#method.__construct">__construct</a>()
|
|
|
64 |
<div class="description">
|
|
|
65 |
Construit et initialise une grille.
|
|
|
66 |
</div>
|
|
|
67 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
68 |
</li>
|
|
|
69 |
<li class="method">
|
|
|
70 |
<a id="method.hide"></a><span class="access">public</span> <a href="Grid.html#method.hide">hide</a>(<span class="type">bool</span> <span class="argument">$hide</span> := <span class="default">TRUE</span>)
|
|
|
71 |
<div class="description">
|
|
|
72 |
Cache ou affiche la grille sur le composant.
|
|
|
73 |
</div>
|
|
|
74 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
75 |
</li>
|
|
|
76 |
<li class="method">
|
|
|
77 |
<a id="method.hideHorizontal"></a><span class="access">public</span> <a href="Grid.html#method.hideHorizontal">hideHorizontal</a>(<span class="type">bool</span> <span class="argument">$hide</span> := <span class="default">TRUE</span>)
|
|
|
78 |
<div class="description">
|
|
|
79 |
Cache ou affiche les lignes horizontales de la grille sur le composant.
|
|
|
80 |
</div>
|
|
|
81 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
82 |
</li>
|
|
|
83 |
<li class="method">
|
|
|
84 |
<a id="method.hideVertical"></a><span class="access">public</span> <a href="Grid.html#method.hideVertical">hideVertical</a>(<span class="type">bool</span> <span class="argument">$hide</span> := <span class="default">TRUE</span>)
|
|
|
85 |
<div class="description">
|
|
|
86 |
Cache ou affiche les lignes verticales de la grille sur le composant.
|
|
|
87 |
</div>
|
|
|
88 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
89 |
</li>
|
|
|
90 |
<li class="method">
|
|
|
91 |
<a id="method.setColor"></a><span class="access">public</span> <a href="Grid.html#method.setColor">setColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
92 |
<div class="description">
|
|
|
93 |
Change la couleur de la grille pour la couleur $color.
|
|
|
94 |
</div>
|
|
|
95 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
96 |
</li>
|
|
|
97 |
<li class="method">
|
|
|
98 |
<a id="method.setBackgroundColor"></a><span class="access">public</span> <a href="Grid.html#method.setBackgroundColor">setBackgroundColor</a>(<a href="Color.html"><span class="type">Color</span></a> <span class="argument">$color</span>)
|
|
|
99 |
<div class="description">
|
|
|
100 |
Change la couleur de fond de la grille pour la couleur $color.
|
|
|
101 |
</div>
|
|
|
102 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
103 |
</li>
|
|
|
104 |
<li class="method">
|
|
|
105 |
<a id="method.setType"></a><span class="access">public</span> <a href="Grid.html#method.setType">setType</a>(<span class="type">int</span> <span class="argument">$type</span>)
|
|
|
106 |
<div class="description">
|
|
|
107 |
Change le type de ligne à utiliser sur la grille. $type peut être <a href="Line.html#constant.SOLID">Line::SOLID</a> pour une ligne continue, <a href="Line.html#constant.DOTTED">Line::DOTTED</a> pour une ligne pointillée ou encore <a href="Line.html#constant.DASHED">Line::DASHED</a>.
|
|
|
108 |
</div>
|
|
|
109 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
110 |
</li>
|
|
|
111 |
<li class="method">
|
|
|
112 |
<a id="method.setInterval"></a><span class="access">public</span> <a href="Grid.html#method.setInterval">setInterval</a>(<span class="type">int</span> <span class="argument">$hInterval</span>, <span class="type">int</span> <span class="argument">$vInterval</span>)
|
|
|
113 |
<div class="description">
|
|
|
114 |
Change l'interval d'affichage des lignes horizontales de la grille avec $hInterval et verticales avec $vInterval.
|
|
|
115 |
Par défaut, cet interval est à 1 et toutes les lignes sont affichées.
|
|
|
116 |
Si vous choisissez un interval de 2 par exemple, une ligne sur deux sera affichée sur la grille.
|
|
|
117 |
</div>
|
|
|
118 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
119 |
</li>
|
|
|
120 |
<li class="method">
|
|
|
121 |
<a id="method.setSpace"></a><span class="access">public</span> <a href="Grid.html#method.setSpace">setSpace</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>)
|
|
|
122 |
<div class="description">
|
|
|
123 |
Change l'espace interne de la grille.
|
|
|
124 |
Les valeurs $left, $right, $top et $bottom représentent respectivement les nouvelles valeurs pour l'espace gauche, droit, haut et bas de la grille.
|
|
|
125 |
</div>
|
|
|
126 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
127 |
</li>
|
|
|
128 |
<li class="method">
|
|
|
129 |
<a id="method.setGrid"></a><span class="access">public</span> <a href="Grid.html#method.setGrid">setGrid</a>(<span class="type">array</span> <span class="argument">$xgrid</span>, <span class="type">array</span> <span class="argument">$ygrid</span>)
|
|
|
130 |
<div class="description">
|
|
|
131 |
Précise la position sur la grille des lignes horizontales avec $ygrid et verticales avec $xgrid.
|
|
|
132 |
Ces deux paramètres sont des tableaux qui contiennent des entiers entre 0 et 1. Chaque valeur représente la position d'une ligne comme une fraction de la taille de la grille.
|
|
|
133 |
</div>
|
|
|
134 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
135 |
</li>
|
|
|
136 |
<li class="method">
|
|
|
137 |
<a id="method.draw"></a><span class="access">public</span> <a href="Grid.html#method.draw">draw</a>(<a href="Driver.html"><span class="type">Driver</span></a> <span class="argument">$driver</span>, <span class="type">int</span> <span class="argument">$x1</span>, <span class="type">int</span> <span class="argument">$y1</span>, <span class="type">int</span> <span class="argument">$x2</span>, <span class="type">int</span> <span class="argument">$y2</span>)
|
|
|
138 |
<div class="description">
|
|
|
139 |
Dessine la grille avec le pilote $driver.
|
|
|
140 |
La grille sera dessinée dans un rectangle dont la diagonale est le segment qui relie les points ($x1, $y1) et ($x2, $y2).
|
|
|
141 |
Les lignes dessinées auront été préalablement précisées avec <a href="Grid.html#method.setGrid">setGrid()</a>.
|
|
|
142 |
</div>
|
|
|
143 |
<div class="description-bottom"><a href="Grid.html#top">Remonter</a></div>
|
|
|
144 |
</li>
|
|
|
145 |
</ul>
|
|
|
146 |
</td>
|
|
|
147 |
<td class='borderd'> </td>
|
|
|
148 |
</tr>
|
|
|
149 |
<tr>
|
|
|
150 |
<td class='cornerbg'></td>
|
|
|
151 |
<td class='borderb'> </td>
|
|
|
152 |
<td class='cornerbd'></td>
|
|
|
153 |
</tr>
|
|
|
154 |
</table>
|
|
|
155 |
</div>
|
|
|
156 |
</body>
|
|
|
157 |
</html>
|