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:
@@ -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
|
||||||
*
|
*
|
||||||
|
@@ -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
|
||||||
{
|
{
|
||||||
|
@@ -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
|
||||||
{
|
{
|
||||||
|
@@ -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
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user