From d88cc21b850ce43345b7e05f5771c8de53dac6f3 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sat, 2 Dec 2023 09:28:10 +0100 Subject: [PATCH] Add width & height setter --- src/Geometry/Factories/RectangleFactory.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Geometry/Factories/RectangleFactory.php b/src/Geometry/Factories/RectangleFactory.php index 6ad75cf7..ceeb0672 100644 --- a/src/Geometry/Factories/RectangleFactory.php +++ b/src/Geometry/Factories/RectangleFactory.php @@ -25,6 +25,20 @@ class RectangleFactory return $this; } + public function width(int $width): self + { + $this->rectangle->setWidth($width); + + return $this; + } + + public function height(int $height): self + { + $this->rectangle->setHeight($height); + + return $this; + } + public function background(mixed $color): self { $this->rectangle->setBackgroundColor($color);