当前位置: 首页>>代码示例>>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;未经允许,请勿转载。