예제 #1
0
 /**
  * @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);
 }
예제 #2
0
 /**
  * @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);
 }