1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 12:18:14 +01: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;
}
/**
* {@inheritdoc}
*
* @see DrawableInterface::setPosition()
*/
public function setPosition(PointInterface $position): DrawableInterface
{
$this->pivot = $position;
return $this;
}
/**
* 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
* @return Ellipse
* @see DrawableInterface::setPosition()
*/
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
* @return Polygon
* @see DrawableInterface::setPosition()
*/
public function setPosition(PointInterface $position): self
{

View File

@ -13,6 +13,14 @@ interface DrawableInterface
*/
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
*