From 948e9fdb4f1e3b96712be85d0e9756d5b8660363 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Wed, 31 Jan 2024 16:25:34 +0100 Subject: [PATCH] Add doc blocks --- src/Geometry/Ellipse.php | 1 - src/Interfaces/ImageInterface.php | 1 - src/Interfaces/SizeInterface.php | 33 +++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/Geometry/Ellipse.php b/src/Geometry/Ellipse.php index 1d157061..731e52cc 100644 --- a/src/Geometry/Ellipse.php +++ b/src/Geometry/Ellipse.php @@ -29,7 +29,6 @@ class Ellipse implements DrawableInterface ) { } - /** * {@inheritdoc} * diff --git a/src/Interfaces/ImageInterface.php b/src/Interfaces/ImageInterface.php index 7fcc9c58..9d01cd5e 100644 --- a/src/Interfaces/ImageInterface.php +++ b/src/Interfaces/ImageInterface.php @@ -160,7 +160,6 @@ interface ImageInterface extends IteratorAggregate, Countable */ public function resolution(): ResolutionInterface; - /** * Set image resolution * diff --git a/src/Interfaces/SizeInterface.php b/src/Interfaces/SizeInterface.php index 83533643..03af8688 100644 --- a/src/Interfaces/SizeInterface.php +++ b/src/Interfaces/SizeInterface.php @@ -89,6 +89,14 @@ interface SizeInterface * @return SizeInterface */ public function movePivot(string $position, int $offset_x = 0, int $offset_y = 0): SizeInterface; + + /** + * Align pivot of current object to given position + * + * @param SizeInterface $size + * @param string $position + * @return SizeInterface + */ public function alignPivotTo(SizeInterface $size, string $position): SizeInterface; /** @@ -99,11 +107,36 @@ interface SizeInterface * @return PointInterface */ public function relativePositionTo(SizeInterface $size): PointInterface; + + /** + * @see ImageInterface::resize() + */ public function resize(?int $width = null, ?int $height = null): SizeInterface; + + /** + * @see ImageInterface::resizeDown() + */ public function resizeDown(?int $width = null, ?int $height = null): SizeInterface; + + /** + * @see ImageInterface::scale() + */ public function scale(?int $width = null, ?int $height = null): SizeInterface; + + /** + * @see ImageInterface::scaleDown() + */ public function scaleDown(?int $width = null, ?int $height = null): SizeInterface; + + /** + * @see ImageInterface::cover() + */ public function cover(int $width, int $height): SizeInterface; + + /** + * @see ImageInterface::contain() + */ public function contain(int $width, int $height): SizeInterface; + public function containMax(int $width, int $height): SizeInterface; }