Пример #1
0
 /**
  * construct new polygon
  *
  * @param \ArrayObject                 $coordinates
  * @param \Jaguar\Color\ColorInterface $color
  */
 public function __construct(\ArrayObject $coordinates = null, ColorInterface $color = null)
 {
     parent::__construct($color);
     $this->coordinates = new \ArrayObject();
     if (null !== $coordinates) {
         $this->setCoordinate($coordinates);
     }
 }
 /**
  * construct new rectangle
  *
  * @param \Jaguar\Dimension               $size
  * @param \Jaguar\Coordinate              $start
  * @param \Jaguar\Drawable\ColorInterface $color
  */
 public function __construct(Dimension $size = null, Coordinate $start = null, ColorInterface $color = null)
 {
     parent::__construct($color);
     $this->setStart($start === null ? new Coordinate() : $start);
     $this->setDimension($size === null ? new Dimension() : $size);
 }
Пример #3
0
 /**
  * construct new arc
  *
  * @param \Jaguar\Dimension            $dimension
  * @param \Jaguar\Coordinate           $center
  * @param \Jaguar\Color\ColorInterface $color
  */
 public function __construct(Dimension $dimension = null, Coordinate $center = null, ColorInterface $color = null)
 {
     parent::__construct($color);
     $this->setDimension($dimension === null ? new Dimension() : $dimension)->setCenter($center === null ? new Coordinate() : $center)->setDegree(0, 360)->connectAngles(false)->connectAnglesToCenter(false)->setRounded(true);
 }