Ejemplo n.º 1
0
 function drawBars(&$im)
 {
     // Checksum
     $this->calculateChecksum();
     $temp_text = $this->text . $this->keys[$this->checksumValue];
     // Starting Code
     $this->drawChar($im, '000', true);
     // Draw Second Code
     $this->drawChar($im, $this->findCode($temp_text[1]), false);
     // Draw Manufacturer Code
     for ($i = 0; $i < 5; $i++) {
         $this->drawChar($im, BCGean13::inverse($this->findCode($temp_text[$i + 2]), $this->codeParity[(int) $temp_text[0]][$i]), false);
     }
     // Draw Center Guard Bar
     $this->drawChar($im, '00000', false);
     // Draw Product Code
     for ($i = 7; $i < 13; $i++) {
         $this->drawChar($im, $this->findCode($temp_text[$i]), true);
     }
     // Draw Right Guard Bar
     $this->drawChar($im, '000', true);
 }