Exemple #1
0
 public function __construct($aIcon, $aScale = 1)
 {
     global $_gPredefIcons;
     if (is_string($aIcon)) {
         $this->iGDImage = Graph::LoadBkgImage('', $aIcon);
     } elseif (is_integer($aIcon)) {
         // Builtin image
         $this->iGDImage = $_gPredefIcons->GetImg($aIcon);
     } else {
         Util\JpGraphError::RaiseL(6011);
         //('Argument to IconImage must be string or integer');
     }
     $this->iScale = $aScale;
     $this->iWidth = Image::GetWidth($this->iGDImage);
     $this->iHeight = Image::GetHeight($this->iGDImage);
 }