當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BCGBarcode1D::getDimension方法代碼示例

本文整理匯總了PHP中BCGBarcode1D::getDimension方法的典型用法代碼示例。如果您正苦於以下問題:PHP BCGBarcode1D::getDimension方法的具體用法?PHP BCGBarcode1D::getDimension怎麽用?PHP BCGBarcode1D::getDimension使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BCGBarcode1D的用法示例。


在下文中一共展示了BCGBarcode1D::getDimension方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $array = str_split($this->text, 1);
     $textlength = array_sum($array) + count($array);
     $w += $textlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:hscomp2002,項目名稱:superp,代碼行數:15,代碼來源:BCGothercode.barcode.php

示例2: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $startlength = 4;
     $textlength = 5 * 7;
     $intercharlength = 2 * 4;
     $w += $startlength + $textlength + $intercharlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:OranTing,項目名稱:gdby_github_repo,代碼行數:16,代碼來源:BCGupcext5.barcode.php

示例3: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $startlength = 3;
     $centerlength = 5;
     $textlength = 12 * 7;
     $endlength = 3;
     $w += $startlength + $centerlength + $textlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:shojibflamon,項目名稱:Bar-Code-example,代碼行數:17,代碼來源:BCGean13.barcode.php

示例4: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $textlength = 12 * strlen($this->text);
     $startlength = 3;
     $checksumlength = $this->checksum * 12;
     $endlength = 4;
     $w += $startlength + $textlength + $checksumlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:rajarshc,項目名稱:Rooja,代碼行數:17,代碼來源:BCGmsi.barcode.php

示例5: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $textlength = 13 * strlen($this->text);
     $startlength = 13;
     $checksumlength = 0;
     if ($this->checksum === true) {
         $checksumlength = 13;
     }
     $endlength = 13;
     $w += $startlength + $textlength + $checksumlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:pradeep-chauhan,項目名稱:chanchal,代碼行數:20,代碼來源:BCGcode39.barcode.php

示例6: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $c = strlen($this->text);
     $startlength = 6;
     $textlength = $c * 5 * 6;
     $checksumlength = 5 * 6;
     $endlength = 6;
     // We remove the white on the right
     $removelength = -3;
     $w += $startlength + $textlength + $checksumlength + $endlength + $removelength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:hscomp2002,項目名稱:superp,代碼行數:20,代碼來源:BCGpostnet.barcode.php

示例7: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $c = strlen($this->text);
     $startlength = 8;
     $textlength = $c * 14;
     $checksumlength = 0;
     if ($c % 2 !== 0) {
         $checksumlength = 14;
     }
     $endlength = 7;
     $w += $startlength + $textlength + $checksumlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:minorusal,項目名稱:administrador,代碼行數:21,代碼來源:BCGs25.barcode.php

示例8: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $textLength = 0;
     $c = strlen($this->text);
     for ($i = 0; $i < $c; $i++) {
         $index = $this->findIndex($this->text[$i]);
         if ($index !== false) {
             $textLength += 8;
             $textLength += substr_count($this->code[$index], '1');
         }
     }
     $w += $textLength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:shojibflamon,項目名稱:Bar-Code-example,代碼行數:22,代碼來源:BCGcodabar.barcode.php

示例9: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $startlength = 8;
     $textlength = 0;
     $c = strlen($this->text);
     for ($i = 0; $i < $c; $i++) {
         $textlength += $this->getIndexLength($this->findIndex($this->text[$i]));
     }
     $checksumlength = 0;
     $this->calculateChecksum();
     $c = count($this->checksumValue);
     for ($i = 0; $i < $c; $i++) {
         $checksumlength += $this->getIndexLength($this->checksumValue[$i]);
     }
     $endlength = 7;
     $w += $startlength + $textlength + $checksumlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:minorusal,項目名稱:administrador,代碼行數:26,代碼來源:BCGcode11.barcode.php

示例10: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $textlength = 0;
     $c = strlen($this->text);
     for ($i = 0; $i < $c; $i++) {
         $index = $this->findIndex($this->text[$i]);
         if ($index !== false) {
             $textlength += 6;
             $textlength += substr_count($this->code[$index], '1');
         }
     }
     $startlength = 8;
     // We take the max length possible for checksums (it is 7 or 8...)
     $checksumlength = 8;
     if ($c >= 10) {
         $checksumlength += 8;
     }
     $endlength = 7 * $this->scale;
     $w += $startlength + $textlength + $checksumlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:dducrest,項目名稱:brewcompetitiononlineentry,代碼行數:29,代碼來源:BCGcode11.barcode.php

示例11: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $w += 65 * 3;
     $h += $this->thickness;
     // We remove the white on the right
     $w -= 1.56;
     if ($this->quietZone) {
         $w += 18;
         $h += 4;
     }
     return parent::getDimension($w, $h);
 }
開發者ID:sea129,項目名稱:kbay,代碼行數:19,代碼來源:BCGintelligentmail.barcode.php

示例12: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     // Contains start + text + checksum + stop
     $textlength = count($this->data) * 11;
     $endlength = 2;
     // + final bar
     $w += $textlength + $endlength;
     $h += $this->thickness;
     return parent::getDimension($w, $h);
 }
開發者ID:hscomp2002,項目名稱:superp,代碼行數:17,代碼來源:BCGcode128.barcode.php

示例13: getDimension

 /**
  * Returns the maximal size of a barcode.
  *
  * @param int $w
  * @param int $h
  * @return int[]
  */
 public function getDimension($w, $h)
 {
     $textlength = 13 * count($this->data);
     $startlength = 13;
     $checksumlength = 0;
     if ($this->checksum === true) {
         $checksumlength = 13;
     }
     $endlength = 13;
     $w += $startlength + $textlength + $checksumlength + $endlength;
     $h += $this->thickness;
     return BCGBarcode1D::getDimension($w, $h);
 }
開發者ID:sea129,項目名稱:kbay,代碼行數:20,代碼來源:BCGcode39extended.barcode.php

示例14: draw

     * @param resource $im

     */
    public function draw($im)
    {
        // Starting *
        $this->drawChar($im, $this->code[$this->starting], true);
        $c = count($this->data);
        for ($i = 0; $i < $c; $i++) {
            $this->drawChar($im, $this->data[$i], true);
        }
        // Checksum
        $c = count($this->checksumValue);
        for ($i = 0; $i < $c; $i++) {
            $this->drawChar($im, $this->code[$this->checksumValue[$i]], true);
        }
        // Ending *
        $this->drawChar($im, $this->code[$this->ending], true);
開發者ID:guillermoluced,項目名稱:Plugin-VirtueMart,代碼行數:18,代碼來源:BCGcode93.barcode.php


注:本文中的BCGBarcode1D::getDimension方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。