imagefilledpolygon
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Draw a filled polygon
imagefilledpolygon
(
GdImage $image
, array
$points
,
int $color
):
bool
Intervention/image
public function
applyToImage
(
Image $image
,
$x
=
0
,
$y
=
0
)
{
$background
= new
Color
(
$this
->
background
);
imagefilledpolygon
(
$image
->
getCore
(),
$this
->
points
,
intval
(
count
(
$this
->
points
) /
2
),
$background
->
getInt
());
if (
$this
->
hasBorder
()) {
$border_color
= new
Color
(
$this
->
border_color
);
src/Intervention/Image/Gd/Shapes/PolygonShape.php