imagedashedline() 함수는 점선을 그립니다.
구문
imagedashedline( $image , $x1 , $y1 , $x2 , $y2 , $color )
매개변수
-
이미지
imagecreatetruecolor()를 사용하여 빈 이미지를 만듭니다. -
x1
왼쪽 상단 x 좌표 -
y1
왼쪽 상단 y 좌표 -
x2
오른쪽 하단 x 좌표 -
y2
오른쪽 하단 y 좌표 -
색상
채우기 색상입니다.
돌아가기
이 함수는 성공하면 TRUE를, 실패하면 FALSE를 반환합니다.
예
다음은 예입니다.
<?php
$image = imagecreatetruecolor(500, 370);
$bgcolor = imagecolorallocate($image, 70, 90, 120);
imagefill($image, 0, 0, $bgcolor);
$color = imagecolorallocate($image, 90, 220, 175);
imagedashedline($image, 0, 0, 150, 50, $color);
header("Content-type: image/png");
imagepng($image);
?> 출력
다음은 출력입니다.
