mirror of
https://github.com/Intervention/image.git
synced 2025-08-20 04:31:24 +02:00
Add imagesetthickness on GD's draw modifiers
Make sure that no border is drawn for background colors
This commit is contained in:
@@ -35,6 +35,7 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements Speciali
|
|||||||
$this->backgroundColor()
|
$this->backgroundColor()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
imagesetthickness($frame->native(), 0);
|
||||||
imagefilledpolygon(
|
imagefilledpolygon(
|
||||||
$frame->native(),
|
$frame->native(),
|
||||||
$polygon,
|
$polygon,
|
||||||
|
@@ -55,6 +55,7 @@ class DrawEllipseModifier extends GenericDrawEllipseModifier implements Speciali
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
imagealphablending($frame->native(), true);
|
imagealphablending($frame->native(), true);
|
||||||
|
imagesetthickness($frame->native(), 0);
|
||||||
imagefilledellipse(
|
imagefilledellipse(
|
||||||
$frame->native(),
|
$frame->native(),
|
||||||
$this->drawable()->position()->x(),
|
$this->drawable()->position()->x(),
|
||||||
|
@@ -19,6 +19,7 @@ class DrawPolygonModifier extends ModifiersDrawPolygonModifier implements Specia
|
|||||||
foreach ($image as $frame) {
|
foreach ($image as $frame) {
|
||||||
if ($this->drawable->hasBackgroundColor()) {
|
if ($this->drawable->hasBackgroundColor()) {
|
||||||
imagealphablending($frame->native(), true);
|
imagealphablending($frame->native(), true);
|
||||||
|
imagesetthickness($frame->native(), 0);
|
||||||
imagefilledpolygon(
|
imagefilledpolygon(
|
||||||
$frame->native(),
|
$frame->native(),
|
||||||
$this->drawable->toArray(),
|
$this->drawable->toArray(),
|
||||||
|
@@ -22,6 +22,7 @@ class DrawRectangleModifier extends GenericDrawRectangleModifier implements Spec
|
|||||||
// draw background
|
// draw background
|
||||||
if ($this->drawable->hasBackgroundColor()) {
|
if ($this->drawable->hasBackgroundColor()) {
|
||||||
imagealphablending($frame->native(), true);
|
imagealphablending($frame->native(), true);
|
||||||
|
imagesetthickness($frame->native(), 0);
|
||||||
imagefilledrectangle(
|
imagefilledrectangle(
|
||||||
$frame->native(),
|
$frame->native(),
|
||||||
$position->x(),
|
$position->x(),
|
||||||
|
Reference in New Issue
Block a user