protected function createCanvas()
    {
        $this->canvas['canvas'] = imagecreatetruecolor($this->canvas['width'], $this->canvas['height']);
        if ($this->canvas['canvas'] === false) {
            throw new \Exception(Helper::ERROR_CALL_IMAGECREATETRUECOLOR);
        }

        $fill_color = imagecolorallocate($this->canvas['canvas'], $this->canvas['color']['r'],
            $this->canvas['color']['g'], $this->canvas['color']['b']);
        if ($fill_color === false) {
            throw new \Exception(Helper::ERROR_CALL_IMAGECOLORALLOCATE);
        }

        if (imagefill($this->canvas['canvas'], 0, 0, $fill_color) === false) {
            throw new \Exception(Helper::ERROR_CALL_IMAGEFILL);
        };
    }
protected function createCanvas()
    {
        $this->canvas['canvas'] = imagecreatetruecolor($this->canvas['width'], $this->canvas['height']);
        if ($this->canvas['canvas'] === false) {
            throw new \Exception(Helper::ERROR_CALL_IMAGECREATETRUECOLOR);
        }

        $fill_color = imagecolorallocate($this->canvas['canvas'], $this->canvas['color']['r'],
            $this->canvas['color']['g'], $this->canvas['color']['b']);
        if ($fill_color === false) {
            throw new \Exception(Helper::ERROR_CALL_IMAGECOLORALLOCATE);
        }

        if (imagefill($this->canvas['canvas'], 0, 0, $fill_color) === false) {
            throw new \Exception(Helper::ERROR_CALL_IMAGEFILL);
        };
    }
protected function createCanvas ( ) { $ this -> canvas [ 'canvas' ] = imagecreatetruecolor ( $ this -> canvas [ 'width' ] , $ this -> canvas [ 'height' ] ) ; if ( $ this -> canvas [ 'canvas' ] === false ) { throw new \ Exception ( Helper :: ERROR_CALL_IMAGECREATETRUECOLOR ) ; } $ fill_color = imagecolorallocate ( $ this -> canvas [ 'canvas' ] , $ this -> canvas [ 'color' ] [ 'r' ] , $ this -> canvas [ 'color' ] [ 'g' ] , $ this -> canvas [ 'color' ] [ 'b' ] ) ; if ( $ fill_color === false ) { throw new \ Exception ( Helper :: ERROR_CALL_IMAGECOLORALLOCATE ) ; } if ( imagefill ( $ this -> canvas [ 'canvas' ] , 0 , 0 , $ fill_color ) === false ) { throw new \ Exception ( Helper :: ERROR_CALL_IMAGEFILL ) ; } ; }
Create the canvas and fill with the canvas colour

@throws \Exception
Create the canvas and fill with the canvas colour