imagepolygon
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Draws a polygon
imagepolygon
(
GdImage $image
, array
$points
,
int $color
):
bool
Intervention/image
if (
$this
->
hasBorder
()) {
$border_color
= new
Color
(
$this
->
border_color
);
imagesetthickness
(
$image
->
getCore
(),
$this
->
border_width
);
imagepolygon
(
$image
->
getCore
(),
$this
->
points
,
intval
(
count
(
$this
->
points
) /
2
),
$border_color
->
getInt
());
}
return
true
;
src/Intervention/Image/Gd/Shapes/PolygonShape.php