From 5eb3eb5427a53a9232853d31e9b83bb69a75063f Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 26 Nov 2023 10:10:44 +0100 Subject: [PATCH] Fix bugs --- src/Drivers/DrawModifier.php | 4 ++-- src/Drivers/Gd/FontProcessor.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Drivers/DrawModifier.php b/src/Drivers/DrawModifier.php index fda7ffd9..001b825e 100644 --- a/src/Drivers/DrawModifier.php +++ b/src/Drivers/DrawModifier.php @@ -3,16 +3,16 @@ namespace Intervention\Image\Drivers; use Intervention\Image\Exceptions\DecoderException; -use Intervention\Image\Geometry\Point; use Intervention\Image\Interfaces\ColorInterface; use Intervention\Image\Interfaces\DrawableInterface; +use Intervention\Image\Interfaces\PointInterface; /** * @property DrawableInterface $drawable */ abstract class DrawModifier extends DriverModifier { - public function position(): Point + public function position(): PointInterface { return $this->drawable->position(); } diff --git a/src/Drivers/Gd/FontProcessor.php b/src/Drivers/Gd/FontProcessor.php index 4ed6e979..cfc8d2f4 100644 --- a/src/Drivers/Gd/FontProcessor.php +++ b/src/Drivers/Gd/FontProcessor.php @@ -45,7 +45,7 @@ class FontProcessor extends AbstractFontProcessor return $polygon; } - public function adjustedSize(): int + public function adjustedSize(): float { return floatval(ceil($this->font->size() * .75)); } @@ -53,7 +53,7 @@ class FontProcessor extends AbstractFontProcessor public function getGdFont(): int { if (is_numeric($this->font->filename())) { - return $this->font->filename(); + return intval($this->font->filename()); } return 1;