186 protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15)
189 $pdf->SetLineWidth($epaisseur);
190 $length = abs($x1 - $x2);
191 $hauteur = abs($y1 - $y2);
192 if ($length > $hauteur) {
193 $Pointilles = ($length / $nbPointilles) / 2;
195 $Pointilles = ($hauteur / $nbPointilles) / 2;
197 for ($i = $x1; $i <= $x2; $i += $Pointilles + $Pointilles) {
198 for ($j = $i; $j <= ($i + $Pointilles); $j++) {
199 if ($j <= ($x2 - 1)) {
201 $pdf->Line($j, $y1, $j + 1, $y1);
203 $pdf->Line($j, $y2, $j + 1, $y2);
207 for ($i = $y1; $i <= $y2; $i += $Pointilles + $Pointilles) {
208 for ($j = $i; $j <= ($i + $Pointilles); $j++) {
209 if ($j <= ($y2 - 1)) {
211 $pdf->Line($x1, $j, $x1, $j + 1);
213 $pdf->Line($x2, $j, $x2, $j + 1);
235 protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4)
238 $pdf->SetDrawColor(192, 192, 192);
240 $pdf->SetLineWidth($epaisseur);
243 $pdf->Line($x1, $y1 - $lg, $x1, $y1 + $lg);
244 $pdf->Line($x1 - $lg, $y1, $x1 + $lg, $y1);
246 $pdf->Line($x1, $y2 - $lg, $x1, $y2 + $lg);
247 $pdf->Line($x1 - $lg, $y2, $x1 + $lg, $y2);
249 $pdf->Line($x2, $y1 - $lg, $x2, $y1 + $lg);
250 $pdf->Line($x2 - $lg, $y1, $x2 + $lg, $y1);
252 $pdf->Line($x2, $y2 - $lg, $x2, $y2 + $lg);
253 $pdf->Line($x2 - $lg, $y2, $x2 + $lg, $y2);
255 $pdf->SetDrawColor(0, 0, 0);
292 $_Table_Hauteur_Chars = array(6 => 2, 7 => 2.5, 8 => 3, 9 => 3.5, 10 => 4, 11 => 6, 12 => 7, 13 => 8, 14 => 9, 15 => 10);
293 if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
294 return $_Table_Hauteur_Chars[$pt];
312 $this->_Metric = $format[
'metric'];
313 $this->_Avery_Name = $format[
'name'];
314 $this->_Avery_Code = empty($format[
'code']) ?
'' : $format[
'code'];
315 $this->_Margin_Left = $this->
convertMetric($format[
'marginLeft'], $this->_Metric, $this->_Metric_Doc);
316 $this->_Margin_Top = $this->
convertMetric($format[
'marginTop'], $this->_Metric, $this->_Metric_Doc);
317 $this->_X_Space = $this->
convertMetric($format[
'SpaceX'], $this->_Metric, $this->_Metric_Doc);
318 $this->_Y_Space = $this->
convertMetric($format[
'SpaceY'], $this->_Metric, $this->_Metric_Doc);
319 $this->_X_Number = $format[
'NX'];
320 $this->_Y_Number = $format[
'NY'];
321 $this->_Width = $this->
convertMetric($format[
'width'], $this->_Metric, $this->_Metric_Doc);
322 $this->_Height = $this->
convertMetric($format[
'height'], $this->_Metric, $this->_Metric_Doc);