PHP | ImagickDraw pathEllipticArcAbsolute() Function Last Updated : 23 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report 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, bool $sweep_flag, float $x, float $y ) 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 given programs illustrate the ImagickDraw::pathEllipticArcAbsolute() 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, 'green'); // Create a new ImagickDraw object $draw = new ImagickDraw(); $draw->setFillColor('blue'); // Set the stroke color $draw->setStrokeColor('red'); // Set the stroke width $draw->setStrokeWidth(15); // Draw elliptic arc $draw->pathStart(); $draw->pathEllipticArcAbsolute(420, 250, 10, true, true, 40, 40); $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, '#E57733'); // Create a new ImagickDraw object $draw = new ImagickDraw(); // Set the width of stroke $draw->setStrokeWidth(1); // Set the color of stroke $draw->setStrokeColor('#E57733'); // Set the fill color $draw->setFillColor('black'); // Set the fill rule $draw->setFillRule(Imagick::FILLRULE_NONZERO); // Draw a sunset cartoon $draw->pathStart(); $draw->pathMoveToAbsolute(0, 100); $draw->pathEllipticArcAbsolute(420, 400, 410, true, true, 0, 900); $draw->pathMoveToAbsolute(300, 250); $draw->pathEllipticArcAbsolute(420, 600, 410, true, true, 0, 900); $draw->pathClose(); $draw->pathFinish(); $draw->setFillColor('yellow'); $draw->translate(30, 0); $draw->circle(300, 100, 300, 150); // 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.pathellipticarcabsolute.php Comment More infoAdvertise with us Next Article PHP | ImagickDraw pathMoveToAbsolute() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | ImagickDraw pathEllipticArcRelative() Function 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 2 min read PHP | ImagickDraw pathLineToAbsolute() Function The ImagickDraw::pathLineToAbsolute() function is an inbuilt function in PHP which is used to draw a line path from the current point to the given coordinate using absolute coordinates. The coordinate then becomes the new current point. The initial point can be set using pathMoveToAbsolute() functio 2 min read PHP ImagickDraw pathLineToVerticalAbsolute() Function PHP ImagickDraw::pathLineToVerticalAbsolute() function is an inbuilt function in PHP that is used to draw a vertical line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point. Syntax: bool ImagickDraw::pathLineToVerticalAbso 2 min read PHP | ImagickDraw pathMoveToAbsolute() Function The ImagickDraw::pathMoveToAbsolute() function is an inbuilt function in PHP which is used to start a new sub-path at the given coordinate using absolute 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 pathCurveToAbsolute() Function The ImagickDraw::pathCurveToAbsolute() function is an inbuilt function in PHP which is used to draw a cubic Bezier curve which is a parametric curve. This function draws a curve from the current point to (x, y) using beginning control point (x1, y1) to ending control point (x2, y2). In the last comm 2 min read PHP | ImagickDraw pathLineToHorizontalAbsolute() Function The ImagickDraw::pathLineToHorizontalAbsolute() 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 absolute coordinates. The target point then becomes the new current point. The current point can also be alternatively 2 min read Like