mirror of
https://github.com/Intervention/image.git
synced 2025-08-24 06:22:57 +02:00
Fix bug in DrawPolygonModifier of imagick driver
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace Intervention\Image\Drivers\Imagick\Modifiers;
|
namespace Intervention\Image\Drivers\Imagick\Modifiers;
|
||||||
|
|
||||||
use ImagickDraw;
|
use ImagickDraw;
|
||||||
|
use ImagickPixel;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Intervention\Image\Interfaces\ImageInterface;
|
use Intervention\Image\Interfaces\ImageInterface;
|
||||||
use Intervention\Image\Interfaces\SpecializedInterface;
|
use Intervention\Image\Interfaces\SpecializedInterface;
|
||||||
@@ -18,6 +19,7 @@ class DrawPolygonModifier extends GenericDrawPolygonModifier implements Speciali
|
|||||||
public function apply(ImageInterface $image): ImageInterface
|
public function apply(ImageInterface $image): ImageInterface
|
||||||
{
|
{
|
||||||
$drawing = new ImagickDraw();
|
$drawing = new ImagickDraw();
|
||||||
|
$drawing->setFillColor(new ImagickPixel('transparent')); // defaults to no backgroundColor
|
||||||
|
|
||||||
if ($this->drawable->hasBackgroundColor()) {
|
if ($this->drawable->hasBackgroundColor()) {
|
||||||
$background_color = $this->driver()->colorProcessor($image->colorspace())->colorToNative(
|
$background_color = $this->driver()->colorProcessor($image->colorspace())->colorToNative(
|
||||||
|
Reference in New Issue
Block a user