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:
parent
1da1339a2c
commit
0b47ee8fd0
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user