public function create()
    {
        $this->resource = imagecreatetruecolor($this->width, $this->height);
        imagesavealpha($this->resource, true);

        $color = imagecolorallocatealpha(
            $this->resource,
            $this->red,
            $this->green,
            $this->blue,
            null
        );

        if ($this->figureType == 'rectangle') {
            $this->createRectangle($color);
        }

        if ($this->figureType == 'ellipse') {
            $this->createEllipse($color);
        }

        $this->addOpacityFilter();

        return $this;
    }
public function create()
    {
        $this->resource = imagecreatetruecolor($this->width, $this->height);
        imagesavealpha($this->resource, true);

        $color = imagecolorallocatealpha(
            $this->resource,
            $this->red,
            $this->green,
            $this->blue,
            null
        );

        if ($this->figureType == 'rectangle') {
            $this->createRectangle($color);
        }

        if ($this->figureType == 'ellipse') {
            $this->createEllipse($color);
        }

        $this->addOpacityFilter();

        return $this;
    }
public function create ( ) { $ this -> resource = imagecreatetruecolor ( $ this -> width , $ this -> height ) ; imagesavealpha ( $ this -> resource , true ) ; $ color = imagecolorallocatealpha ( $ this -> resource , $ this -> red , $ this -> green , $ this -> blue , null ) ; if ( $ this -> figureType == 'rectangle' ) { $ this -> createRectangle ( $ color ) ; } if ( $ this -> figureType == 'ellipse' ) { $ this -> createEllipse ( $ color ) ; } $ this -> addOpacityFilter ( ) ; return $ this ; }
Creates the figure with alpha channel.

@access public
@return \GImage\Figure
Creates the figure with alpha channel .