179 protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15)
182 $pdf->SetLineWidth($epaisseur);
183 $length = abs($x1 - $x2);
184 $hauteur = abs($y1 - $y2);
185 if ($length > $hauteur) {
186 $Pointilles = ($length / $nbPointilles) / 2;
188 $Pointilles = ($hauteur / $nbPointilles) / 2;
190 for ($i = $x1; $i <= $x2; $i += $Pointilles + $Pointilles) {
191 for ($j = $i; $j <= ($i + $Pointilles); $j++) {
192 if ($j <= ($x2 - 1)) {
193 $pdf->Line($j, $y1, $j + 1, $y1);
194 $pdf->Line($j, $y2, $j + 1, $y2);
198 for ($i = $y1; $i <= $y2; $i += $Pointilles + $Pointilles) {
199 for ($j = $i; $j <= ($i + $Pointilles); $j++) {
200 if ($j <= ($y2 - 1)) {
201 $pdf->Line($x1, $j, $x1, $j + 1);
202 $pdf->Line($x2, $j, $x2, $j + 1);
222 protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4)
225 $pdf->SetDrawColor(192, 192, 192);
227 $pdf->SetLineWidth($epaisseur);
230 $pdf->Line($x1, $y1 - $lg, $x1, $y1 + $lg);
231 $pdf->Line($x1 - $lg, $y1, $x1 + $lg, $y1);
233 $pdf->Line($x1, $y2 - $lg, $x1, $y2 + $lg);
234 $pdf->Line($x1 - $lg, $y2, $x1 + $lg, $y2);
236 $pdf->Line($x2, $y1 - $lg, $x2, $y1 + $lg);
237 $pdf->Line($x2 - $lg, $y1, $x2 + $lg, $y1);
239 $pdf->Line($x2, $y2 - $lg, $x2, $y2 + $lg);
240 $pdf->Line($x2 - $lg, $y2, $x2 + $lg, $y2);
242 $pdf->SetDrawColor(0, 0, 0);
279 $_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);
280 if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
281 return $_Table_Hauteur_Chars[$pt];
299 $this->_Metric = $format[
'metric'];
300 $this->_Avery_Name = $format[
'name'];
301 $this->_Avery_Code = empty($format[
'code']) ?
'' : $format[
'code'];
302 $this->_Margin_Left = $this->
convertMetric($format[
'marginLeft'], $this->_Metric, $this->_Metric_Doc);
303 $this->_Margin_Top = $this->
convertMetric($format[
'marginTop'], $this->_Metric, $this->_Metric_Doc);
304 $this->_X_Space = $this->
convertMetric($format[
'SpaceX'], $this->_Metric, $this->_Metric_Doc);
305 $this->_Y_Space = $this->
convertMetric($format[
'SpaceY'], $this->_Metric, $this->_Metric_Doc);
306 $this->_X_Number = $format[
'NX'];
307 $this->_Y_Number = $format[
'NY'];
308 $this->_Width = $this->
convertMetric($format[
'width'], $this->_Metric, $this->_Metric_Doc);
309 $this->_Height = $this->
convertMetric($format[
'height'], $this->_Metric, $this->_Metric_Doc);