Example #1
0
 /**
  * Sub process to draw the barcode instructions
  * Needed by the automatic error rendering
  */
 private function _drawInstructionList()
 {
     $instructionList = $this->_barcode->draw();
     foreach ($instructionList as $instruction) {
         switch ($instruction['type']) {
             case 'polygon':
                 $this->_drawPolygon($instruction['points'], $instruction['color'], $instruction['filled']);
                 break;
             case 'text':
                 //$text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
                 $this->_drawText($instruction['text'], $instruction['size'], $instruction['position'], $instruction['font'], $instruction['color'], $instruction['alignment'], $instruction['orientation']);
                 break;
             default:
                 throw new Exception('Unkown drawing command');
         }
     }
 }
Example #2
0
 public function testGetDefaultHeight()
 {
     $this->assertEquals(62, $this->_object->getHeight());
 }