/** * @see wcf\system\image\adapter\IImageAdapter::drawText() */ public function drawText($string, $x, $y) { if (!$this->adapter->hasColor()) { throw new SystemException("Cannot draw text unless a color has been specified with setColor()."); } $this->adapter->drawText($string, $x, $y); }
/** * @see \wcf\system\image\adapter\IImageAdapter::drawText() */ public function drawText($text, $x, $y, $font, $size, $opacity = 1) { if (!$this->adapter->hasColor()) { throw new SystemException("Cannot draw text unless a color has been specified with setColor()."); } // validate opacity if ($opacity < 0 || $opacity > 1) { throw new SystemException("Invalid opacity value given."); } $this->adapter->drawText($text, $x, $y, $font, $size, $opacity); }