Browse Source

[ZF-11106]: remove hardcoded whitespaces in Code25 and Code39 barcodes

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23755 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael 15 years ago
parent
commit
d8a16f3afd
2 changed files with 3 additions and 3 deletions
  1. 2 2
      library/Zend/Barcode/Object/Code25.php
  2. 1 1
      library/Zend/Barcode/Object/Code39.php

+ 2 - 2
library/Zend/Barcode/Object/Code25.php

@@ -97,7 +97,7 @@ class Zend_Barcode_Object_Code25 extends Zend_Barcode_Object_ObjectAbstract
         $barcodeTable[] = array(1 , $this->_barThickWidth , 0 , 1);
         $barcodeTable[] = array(0 , $this->_barThinWidth , 0 , 1);
         $barcodeTable[] = array(1 , $this->_barThinWidth , 0 , 1);
-        $barcodeTable[] = array(0 , 1);
+        $barcodeTable[] = array(0 , $this->_barThinWidth);
 
         $text = str_split($this->getText());
         foreach ($text as $char) {
@@ -106,7 +106,7 @@ class Zend_Barcode_Object_Code25 extends Zend_Barcode_Object_ObjectAbstract
                 /* visible, width, top, length */
                 $width = $c ? $this->_barThickWidth : $this->_barThinWidth;
                 $barcodeTable[] = array(1 , $width , 0 , 1);
-                $barcodeTable[] = array(0 , 1);
+                $barcodeTable[] = array(0 , $this->_barThinWidth);
             }
         }
 

+ 1 - 1
library/Zend/Barcode/Object/Code39.php

@@ -163,7 +163,7 @@ class Zend_Barcode_Object_Code39 extends Zend_Barcode_Object_ObjectAbstract
                 $barcodeTable[] = array((int) $visible, $width, 0, 1);
                 $visible = ! $visible;
             }
-            $barcodeTable[] = array(0 , 1);
+            $barcodeTable[] = array(0 , $this->_barThinWidth);
         }
         return $barcodeTable;
     }