function cloneImage($imageObject, $width, $height, $useTruecolor = null)
 {
     if ($this->ImageObject !== null and $this->ImageObjectRef !== null) {
         $this->destroy();
     }
     $this->ImageObject = eZImageInterface::createImage($width, $height, $useTruecolor);
     $this->IsTrueColor = $useTruecolor;
     $this->ImageObjectRef = eZImageInterface::registerImage($this->ImageObject);
     ImageCopy($this->ImageObject, $imageObject, 0, 0, 0, 0, $width, $height);
 }
示例#2
0
 function destroy()
 {
     if (is_array($this->ImageLayers)) {
         foreach ($this->ImageLayers as $item) {
             if ($this->ImageLayerIndex[$item]['image'] instanceof eZImageLayer) {
                 $this->ImageLayerIndex[$item]['image']->destroy();
             }
         }
     }
     parent::destroy();
 }
 function __construct($imageObjectRef = null, $imageObject = null, $width = false, $height = false, $font = false)
 {
     parent::__construct($imageObjectRef, $imageObject, $width, $height);
     $this->setFont($font);
     $this->TemplateURI = 'design:image/layer.tpl';
 }