ImageMagick ImagickDraw::pathStart
(PECL imagick 2, PECL imagick 3)
ImagickDraw::pathStart — 경로 도면 목록의 시작을 선언합니다.
설명
public ImagickDraw::pathStart(): bool
경고 이 함수는 현재 문서화되어 있지 않습니다. 해당 인수 목록만 사용할 수 있습니다.
일치하는 DrawPathFinish() 명령에 의해 종료되는 경로 그리기 목록의 시작을 선언합니다. 다른 모든 DrawPath 명령은 및 DrawPathFinish() 명령으로 묶어야 합니다. 경로 그리기 명령은 종속 명령이며 자체적으로 작동하지 않기 때문입니다.
반환 값
값이 반환되지 않습니다.
Examples
예제 #1 ImagickDraw::pathStart() 예제
<?php
function pathStart($strokeColor, $fillColor, $backgroundColor) {
$draw = new \ImagickDraw();
$draw->setStrokeOpacity(1);
$draw->setStrokeColor($strokeColor);
$draw->setFillColor($fillColor);
$draw->setStrokeWidth(2);
$draw->setFontSize(72);
$draw->pathStart();
$draw->pathMoveToAbsolute(50, 50);
$draw->pathLineToAbsolute(100, 50);
$draw->pathLineToRelative(0, 50);
$draw->pathLineToHorizontalRelative(-50);
$draw->pathFinish();
$draw->pathStart();
$draw->pathMoveToAbsolute(50, 50);
$draw->pathMoveToRelative(300, 0);
$draw->pathLineToRelative(50, 0);
$draw->pathLineToVerticalRelative(50);
$draw->pathLineToHorizontalAbsolute(350);
$draw->pathclose();
$draw->pathFinish();
$draw->pathStart();
$draw->pathMoveToAbsolute(50, 300);
$draw->pathCurveToAbsolute(50, 300, 100, 200, 300, 300);
$draw->pathLineToVerticalAbsolute(350);
$draw->pathFinish();
$imagick = new \Imagick();
$imagick->newImage(500, 500, $backgroundColor);
$imagick->setImageFormat("png");
$imagick->drawImage($draw);
header("Content-Type: image/png");
echo $imagick->getImageBlob();
}
?>