mirror of
https://github.com/Intervention/image.git
synced 2025-08-28 16:19:50 +02:00
Fix bugs
This commit is contained in:
@@ -3,16 +3,16 @@
|
|||||||
namespace Intervention\Image\Drivers;
|
namespace Intervention\Image\Drivers;
|
||||||
|
|
||||||
use Intervention\Image\Exceptions\DecoderException;
|
use Intervention\Image\Exceptions\DecoderException;
|
||||||
use Intervention\Image\Geometry\Point;
|
|
||||||
use Intervention\Image\Interfaces\ColorInterface;
|
use Intervention\Image\Interfaces\ColorInterface;
|
||||||
use Intervention\Image\Interfaces\DrawableInterface;
|
use Intervention\Image\Interfaces\DrawableInterface;
|
||||||
|
use Intervention\Image\Interfaces\PointInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property DrawableInterface $drawable
|
* @property DrawableInterface $drawable
|
||||||
*/
|
*/
|
||||||
abstract class DrawModifier extends DriverModifier
|
abstract class DrawModifier extends DriverModifier
|
||||||
{
|
{
|
||||||
public function position(): Point
|
public function position(): PointInterface
|
||||||
{
|
{
|
||||||
return $this->drawable->position();
|
return $this->drawable->position();
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ class FontProcessor extends AbstractFontProcessor
|
|||||||
return $polygon;
|
return $polygon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function adjustedSize(): int
|
public function adjustedSize(): float
|
||||||
{
|
{
|
||||||
return floatval(ceil($this->font->size() * .75));
|
return floatval(ceil($this->font->size() * .75));
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ class FontProcessor extends AbstractFontProcessor
|
|||||||
public function getGdFont(): int
|
public function getGdFont(): int
|
||||||
{
|
{
|
||||||
if (is_numeric($this->font->filename())) {
|
if (is_numeric($this->font->filename())) {
|
||||||
return $this->font->filename();
|
return intval($this->font->filename());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user