ImageMagick ImagickDraw::pathCurveToQuadraticBezierSmoothRelative

(PECL imagick 2, PECL imagick 3)

ImagickDraw::pathCurveToQuadraticBezierSmoothRelative — 2차 베지어 곡선을 그립니다.


설명

public ImagickDraw::pathCurveToQuadraticBezierSmoothRelative(float $x, float $y): bool

경고 이 함수는 현재 문서화되어 있지 않습니다. 해당 인수 목록만 사용할 수 있습니다.

현재 점에서 (x, y)까지 2차 베지어 곡선(상대 좌표 사용)을 그립니다. 제어점은 현재 점을 기준으로 이전 명령에 대한 제어점의 반영으로 간주됩니다. (이전 명령이 없거나 이전 명령이 DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolut 또는 DrawPathCurveToQuadraticBezierSmoothRelative가 아닌 경우 제어점이 현재 점과 일치한다고 가정) 명령이 끝나면 새 현재 점이 폴리베지어에서 사용되는 최종 (x, y) 좌표 쌍이 됩니다.

이 함수는 3차 베지어 곡선을 부드럽게 이어가는 데 사용할 수 없습니다. 2차 곡선에서 매끄럽게만 계속될 수 있습니다.


매개변수

x
ending x coordinate
y
ending y coordinate

반환 값

값이 반환되지 않습니다.


Examples

예제 #1 ImagickDraw::pathCurveToQuadraticBezierSmoothRelative() 예제

                  
<?php
$draw = new \ImagickDraw();

$draw->setStrokeOpacity(1);
$draw->setStrokeColor("black");
$draw->setFillColor("blue");

$draw->setStrokeWidth(2);
$draw->setFontSize(72);

$draw->pathStart();
$draw->pathMoveToAbsolute(50,250);

// This specifies a quadratic bezier curve with the current position as the start
// point, the control point is the first two params, and the end point is the last two params.
$draw->pathCurveToQuadraticBezierAbsolute(
    150,50,
    250,250
);

// This specifies a quadratic bezier curve with the current position as the start
// point, the control point is mirrored from the previous curves control point
// and the end point is defined by the x, y values.
$draw->pathCurveToQuadraticBezierSmoothAbsolute(
    450,250
);

// This specifies a quadratic bezier curve with the current position as the start
// point, the control point is mirrored from the previous curves control point
// and the end point is defined relative from the current position by the x, y values.
$draw->pathCurveToQuadraticBezierSmoothRelative(
    200,-100
);

$draw->pathFinish();

$imagick = new \Imagick();
$imagick->newImage(700, 500, $backgroundColor);
$imagick->setImageFormat("png");

$imagick->drawImage($draw);

header("Content-Type: image/png");
echo $imagick->getImageBlob();
?>