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); }
/** * Parses the text before displaying it. * * @param mixed $text */ public function parse($text) { $this->text = $text; $this->checksumValue = false; // Reset checksumValue $this->validate(); parent::parse($text); $this->addDefaultLabel(); }
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); }