/**
  * construct new canvas
  *
  * @param \Jaguar\Dimension|\Jaguar\CanvasInterface|file|null $source
  * @param string                                              $factoryName factory name
  *
  * @throws \Jaguar\Exception\InvalidDimensionException
  * @throws \Jaguar\Exception\CanvasCreationException
  */
 public function __construct($source = null, $factoryName = self::Format_PNG)
 {
     $this->__initFactories__();
     $this->setFormat($factoryName);
     parent::__construct($source);
 }
Esempio n. 2
0
 /**
  * construct new gd canvas
  *
  * @param \Jaguar\Dimension|\Jaguar\CanvasInterface|file|null $source
  * @param boolean                                             $compressed
  * @param integer                                             $size
  */
 public function __construct($source = null, $compressed = true, $size = 0)
 {
     parent::__construct($source);
     $this->setCompressed($compressed)->setChunkSize($size);
 }