original_string: protected function createEmptyCanvas($width, $height, $rgb, $real)
      {
          $width  = $this->width  ?? $width;
          $height = $this->height ?? $height;
          $rgb    = $this->color  ?? $rgb;
          $real   = $this->real   ?? $real;
  
          $this->imageSize = [$width, $height];
  
          if( $real === false )
          {
              $this->canvas = imagecreate($width, $height);
          }
          else
          {
              $this->canvas = imagecreatetruecolor($width, $height);
          }
  
          if( ! empty($rgb) )
          {
              $this->allocate($rgb);
          }
      }
code: protected function createEmptyCanvas($width, $height, $rgb, $real)
      {
          $width  = $this->width  ?? $width;
          $height = $this->height ?? $height;
          $rgb    = $this->color  ?? $rgb;
          $real   = $this->real   ?? $real;
  
          $this->imageSize = [$width, $height];
  
          if( $real === false )
          {
              $this->canvas = imagecreate($width, $height);
          }
          else
          {
              $this->canvas = imagecreatetruecolor($width, $height);
          }
  
          if( ! empty($rgb) )
          {
              $this->allocate($rgb);
          }
      }
code_tokens: protected function createEmptyCanvas ( $ width , $ height , $ rgb , $ real ) { $ width = $ this -> width ?? $ width ; $ height = $ this -> height ?? $ height ; $ rgb = $ this -> color ?? $ rgb ; $ real = $ this -> real ?? $ real ; $ this -> imageSize = [ $ width , $ height ] ; if ( $ real === false ) { $ this -> canvas = imagecreate ( $ width , $ height ) ; } else { $ this -> canvas = imagecreatetruecolor ( $ width , $ height ) ; } if ( ! empty ( $ rgb ) ) { $ this -> allocate ( $ rgb ) ; } }
docstring: Protected create empty canvas
docstring_tokens: Protected create empty canvas