PHP | ImagickDraw pathEllipticArcRelative() Function Last Updated : 20 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The ImagickDraw::pathEllipticArcRelative() function is an inbuilt function in PHP which is used to draw an elliptical arc from the current point to (x, y) using relative coordinates. Syntax: bool ImagickDraw::pathEllipticArcRelative( float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x ) Parameters: This function accepts seven parameters as mentioned above and described below: $rx: It specifies the x-radius. $ry: It specifies the y-radius $x_axis_rotation: It specifies x-axis rotation $large_arc_flag: It specifies whether to draw the larger of the available arcs. $sweep_flag: It specifies whether to draw the arc matching a clock-wise rotation. $x: It specifies the x-coordinate. $y: It specifies the y-coordinate. Return Value: This function returns TRUE on success. Exceptions: This function throws ImagickException on error. Below programs illustrate the ImagickDraw::pathEllipticArcRelative() function in PHP: Program 1: php <?php // Create a new imagick object $imagick = new Imagick(); // Create a image on imagick object $imagick->newImage(800, 250, '#7441e0'); // Create a new ImagickDraw object $draw = new ImagickDraw(); $draw->setFillColor('#2fceeb'); // Set the stroke color $draw->setStrokeColor('#c27230'); // Set the stroke width $draw->setStrokeWidth(15); // Draw elliptic arc $draw->pathStart(); $draw->pathEllipticArcRelative(120, 9250, 210, false, true, 300, 400); $draw->pathClose(); $draw->pathFinish(); // Render the draw commands $imagick->drawImage($draw); // Show the output $imagick->setImageFormat('png'); header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Program 2: php <?php // Create a new imagick object $imagick = new Imagick(); // Create a image on imagick object $imagick->newImage(800, 250, '#7441e0'); // Create a new ImagickDraw object $draw = new ImagickDraw(); $draw->setFillColor('#2fceeb'); // Set the stroke color $draw->setStrokeColor('#c27230'); // Set the stroke width $draw->setStrokeWidth(15); // Draw elliptic arc $draw->pathStart(); $draw->pathEllipticArcRelative(120, 50, 10, true, true, 300, 400); $draw->pathFinish(); // Render the draw commands $imagick->drawImage($draw); // Show the output $imagick->setImageFormat('png'); header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagickdraw.pathellipticarcrelative.php Comment More infoAdvertise with us Next Article PHP | ImagickDraw pathCurveToRelative() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | ImagickDraw pathEllipticArcAbsolute() Function The ImagickDraw::pathEllipticArcAbsolute() function is an inbuilt function in PHP which is used to draw an elliptical arc from the current point to (x, y) using absolute coordinates. Syntax: bool ImagickDraw::pathEllipticArcAbsolute( float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag 2 min read PHP | ImagickDraw pathLineToRelative() Function The ImagickDraw::pathLineToRelative() function is an inbuilt function in PHP which is used to draw a line path from the current point to the given coordinate using relative coordinates. Then the coordinate becomes the new current point. The initial point can be set using pathMoveToRelative() functio 2 min read PHP | ImagickDraw pathLineToVerticalRelative() Function The ImagickDraw::pathLineToVerticalRelative() function is an inbuilt function in PHP which is used draw a vertical line path from the current point to the target point using relative coordinates. The target point then becomes the new current point. Syntax: bool ImagickDraw::pathLineToVerticalRelativ 2 min read PHP | ImagickDraw pathMoveToRelative() Function The ImagickDraw::pathMoveToRelative() function is an inbuilt function in PHP which is used to start a new sub-path at the given coordinate using relative coordinates. The current point then becomes the specified coordinate. This function is used for setting initial coordinates before starting drawin 2 min read PHP | ImagickDraw pathCurveToRelative() Function The ImagickDraw::pathCurveToRelative() function is an inbuilt function in PHP which is used to draw a cubic Bezier curve from the current point to (x, y) using (x1, y1) as the control point at the beginning of the curve and (x2, y2) as the control point at the end of the curve using relative coordin 2 min read PHP | ImagickDraw pathLineToHorizontalRelative() Function The ImagickDraw::pathLineToHorizontalRelative() function is an inbuilt function in PHP which is used to draw a horizontal line path from the current point to the target point using relative coordinates. The target point then becomes the new current point. Syntax: bool ImagickDraw::pathLineToHorizont 2 min read Like