Ejemplo n.º 1
0
 public function __construct(PointDataInterface $position)
 {
     parent::__construct($position->getX(), $position->getY());
 }
Ejemplo n.º 2
0
 public function __construct(PointDataInterface $position, PointDataInterface $size)
 {
     parent::__construct($position);
     $this->size = new Size($size->getX(), $size->getY());
 }
Ejemplo n.º 3
0
 public function withSize(PointDataInterface $size)
 {
     $rect = clone $this;
     $rect->size = new Size($size->getX(), $size->getY());
     return $rect;
 }
Ejemplo 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);
 }