207 protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15)
210 $pdf->SetLineWidth($epaisseur);
211 $length = abs($x1 - $x2);
212 $hauteur = abs($y1 - $y2);
213 if ($length > $hauteur) {
214 $Pointilles = ($length / $nbPointilles) / 2;
216 $Pointilles = ($hauteur / $nbPointilles) / 2;
218 for ($i = $x1; $i <= $x2; $i += $Pointilles + $Pointilles) {
219 for ($j = $i; $j <= ($i + $Pointilles); $j++) {
220 if ($j <= ($x2 - 1)) {
221 $pdf->Line($j, $y1, $j + 1, $y1);
222 $pdf->Line($j, $y2, $j + 1, $y2);
226 for ($i = $y1; $i <= $y2; $i += $Pointilles + $Pointilles) {
227 for ($j = $i; $j <= ($i + $Pointilles); $j++) {
228 if ($j <= ($y2 - 1)) {
229 $pdf->Line($x1, $j, $x1, $j + 1);
230 $pdf->Line($x2, $j, $x2, $j + 1);
250 protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4)
253 $pdf->SetDrawColor(192, 192, 192);
255 $pdf->SetLineWidth($epaisseur);
258 $pdf->Line($x1, $y1 - $lg, $x1, $y1 + $lg);
259 $pdf->Line($x1 - $lg, $y1, $x1 + $lg, $y1);
261 $pdf->Line($x1, $y2 - $lg, $x1, $y2 + $lg);
262 $pdf->Line($x1 - $lg, $y2, $x1 + $lg, $y2);
264 $pdf->Line($x2, $y1 - $lg, $x2, $y1 + $lg);
265 $pdf->Line($x2 - $lg, $y1, $x2 + $lg, $y1);
267 $pdf->Line($x2, $y2 - $lg, $x2, $y2 + $lg);
268 $pdf->Line($x2 - $lg, $y2, $x2 + $lg, $y2);
270 $pdf->SetDrawColor(0, 0, 0);
307 $_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);
308 if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
309 return $_Table_Hauteur_Chars[$pt];
327 $this->_Metric = $format[
'metric'];
328 $this->_Avery_Name = $format[
'name'];
329 $this->_Avery_Code = empty($format[
'code'])?
'':$format[
'code'];
330 $this->_Margin_Left = $this->
convertMetric($format[
'marginLeft'], $this->_Metric, $this->_Metric_Doc);
331 $this->_Margin_Top = $this->
convertMetric($format[
'marginTop'], $this->_Metric, $this->_Metric_Doc);
332 $this->_X_Space = $this->
convertMetric($format[
'SpaceX'], $this->_Metric, $this->_Metric_Doc);
333 $this->_Y_Space = $this->
convertMetric($format[
'SpaceY'], $this->_Metric, $this->_Metric_Doc);
334 $this->_X_Number = $format[
'NX'];
335 $this->_Y_Number = $format[
'NY'];
336 $this->_Width = $this->
convertMetric($format[
'width'], $this->_Metric, $this->_Metric_Doc);
337 $this->_Height = $this->
convertMetric($format[
'height'], $this->_Metric, $this->_Metric_Doc);