
ImagickDraw::pathLineToHorizontalAbsolute 메소드는 Absolute Horizontal Line을 그리는 데 사용됩니다. 이 메소드의 파라미터는 x 좌표이며, 이 좌표는 Absolute Horizontal Line의 시작점입니다.
이 메소드를 사용하여 Absolute Horizontal Line을 그리는 방법은 다음과 같습니다.
#hostingforum.kr
php
$draw = new ImagickDraw();
$draw->setStrokeColor('black');
$draw->setFillColor('none');
$draw->pathStart();
$draw->pathLineToHorizontalAbsolute(100); // x 좌표 100에 Absolute Horizontal Line을 그립니다.
$draw->pathLineToHorizontalAbsolute(200); // x 좌표 200에 Absolute Horizontal Line을 그립니다.
$draw->pathLineToHorizontalAbsolute(300); // x 좌표 300에 Absolute Horizontal Line을 그립니다.
$draw->pathClose();
$imagick = new Imagick();
$imagick->newImage(400, 200, 'white');
$imagick->drawImage($draw);
$imagick->setImageFormat('png');
$imagick->writeImage('result.png');
이 예제에서는 x 좌표 100, 200, 300에 Absolute Horizontal Line을 그립니다. 결과는 result.png 파일로 저장됩니다.
2025-06-11 04:55