1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-11 16:34:00 +02:00

Add DrawableInterface::setPosition()

This commit is contained in:
Oliver Vogel
2024-06-09 11:23:31 +02:00
parent 1da1339a2c
commit 0b47ee8fd0
4 changed files with 24 additions and 6 deletions

View File

@@ -46,6 +46,18 @@ class Bezier implements IteratorAggregate, Countable, ArrayAccess, DrawableInter
return $this->pivot; return $this->pivot;
} }
/**
* {@inheritdoc}
*
* @see DrawableInterface::setPosition()
*/
public function setPosition(PointInterface $position): DrawableInterface
{
$this->pivot = $position;
return $this;
}
/** /**
* Implement iteration through all points of bezier * Implement iteration through all points of bezier
* *

View File

@@ -40,10 +40,9 @@ class Ellipse implements DrawableInterface
} }
/** /**
* Set position if ellipse * {@inheritdoc}
* *
* @param PointInterface $position * @see DrawableInterface::setPosition()
* @return Ellipse
*/ */
public function setPosition(PointInterface $position): self public function setPosition(PointInterface $position): self
{ {

View File

@@ -47,10 +47,9 @@ class Polygon implements IteratorAggregate, Countable, ArrayAccess, DrawableInte
} }
/** /**
* Set pivot position of polygon * {@inheritdoc}
* *
* @param PointInterface $position * @see DrawableInterface::setPosition()
* @return Polygon
*/ */
public function setPosition(PointInterface $position): self public function setPosition(PointInterface $position): self
{ {

View File

@@ -13,6 +13,14 @@ interface DrawableInterface
*/ */
public function position(): PointInterface; public function position(): PointInterface;
/**
* Set position of the drawable object
*
* @param PointInterface $position
* @return DrawableInterface
*/
public function setPosition(PointInterface $position): self;
/** /**
* Set the background color of the drawable object * Set the background color of the drawable object
* *