예제 #1
0
 public function getMaxSize()
 {
     $p = parent::getMaxSize();
     $label = $this->getLabel();
     $textHeight = 0;
     if (!empty($label)) {
         if ($this->textfont instanceof BCGFont) {
             $textfont = clone $this->textfont;
             $textfont->setText($label);
             $textHeight = $textfont->getHeight() + self::SIZE_SPACING_FONT;
         } elseif ($this->textfont !== 0) {
             $textHeight = imagefontheight($this->textfont) + self::SIZE_SPACING_FONT;
         }
     }
     return array($p[0], $p[1] + $this->thickness * $this->scale + $textHeight);
 }
예제 #2
0
 function getMaxSize()
 {
     // public
     $p = BCGBarcode::getMaxSize();
     $label = $this->getLabel();
     $textHeight = 0;
     if (!empty($label)) {
         if (is_a($this->textfont, 'BCGFont')) {
             $textfont = $this->textfont;
             // clone
             $textfont->setText($label);
             $textHeight = $textfont->getHeight() + $this->SIZE_SPACING_FONT;
         } elseif ($this->textfont !== 0) {
             $textHeight = imagefontheight($this->textfont) + $this->SIZE_SPACING_FONT;
         }
     }
     return array($p[0], $p[1] + $this->thickness * $this->scale + $textHeight);
 }