imageline
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Draw a line
imageline
(
GdImage $image
,
int $x1
,
int $y1
,
int $x2
,
int $y2
,
int $color
):
bool
Intervention/image
public function
applyToImage
(
Image $image
,
$x
=
0
,
$y
=
0
)
{
$color
= new
Color
(
$this
->
color
);
imageline
(
$image
->
getCore
(),
$x
,
$y
,
$this
->
x
,
$this
->
y
,
$color
->
getInt
());
return
true
;
}
src/Intervention/Image/Gd/Shapes/LineShape.php