Esempio n. 1
0
 public function __construct(PointDataInterface $position)
 {
     parent::__construct($position->getX(), $position->getY());
 }
Esempio n. 2
0
 public function __construct(PointDataInterface $position, PointDataInterface $size)
 {
     parent::__construct($position);
     $this->size = new Size($size->getX(), $size->getY());
 }
Esempio n. 3
0
 public function withSize(PointDataInterface $size)
 {
     $rect = clone $this;
     $rect->size = new Size($size->getX(), $size->getY());
     return $rect;
 }
Esempio n. 4
0
 public function transformPoint(PointDataInterface $point)
 {
     $x = $point->getX();
     $y = $point->getY();
     return new Point($this->a * $x + $this->c * $y + $this->tx, $this->b * $x + $this->d * $y + $this->ty);
 }