1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-19 04:01:30 +02:00

Add imagesetthickness on GD's draw modifiers

Make sure that no border is drawn for background colors
This commit is contained in:
Oliver Vogel
2024-06-16 10:44:59 +02:00
parent 6bfd3dd1d4
commit 470b5bfdd8
4 changed files with 4 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements Speciali
$this->backgroundColor()
);
imagesetthickness($frame->native(), 0);
imagefilledpolygon(
$frame->native(),
$polygon,

View File

@@ -55,6 +55,7 @@ class DrawEllipseModifier extends GenericDrawEllipseModifier implements Speciali
);
} else {
imagealphablending($frame->native(), true);
imagesetthickness($frame->native(), 0);
imagefilledellipse(
$frame->native(),
$this->drawable()->position()->x(),

View File

@@ -19,6 +19,7 @@ class DrawPolygonModifier extends ModifiersDrawPolygonModifier implements Specia
foreach ($image as $frame) {
if ($this->drawable->hasBackgroundColor()) {
imagealphablending($frame->native(), true);
imagesetthickness($frame->native(), 0);
imagefilledpolygon(
$frame->native(),
$this->drawable->toArray(),

View File

@@ -22,6 +22,7 @@ class DrawRectangleModifier extends GenericDrawRectangleModifier implements Spec
// draw background
if ($this->drawable->hasBackgroundColor()) {
imagealphablending($frame->native(), true);
imagesetthickness($frame->native(), 0);
imagefilledrectangle(
$frame->native(),
$position->x(),