PHP | ImagickDraw ellipse() Function Last Updated : 23 Dec, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The ImagickDraw::ellipse() function is an inbuilt function in PHP which is used to draw an ellipse on the image. Syntax: bool ImagickDraw::ellipse( float $ox, float $oy, float $rx, float $ry, float $start, float $end ) Parameters: This function accepts six parameters as mentioned above and described below: $ox: It specifies the x-coordinate of the ellipse. $oy: It specifies the y-coordinate of the ellipse. $rx: It specifies the x-radius of the ellipse. $ry: It specifies the y-radius of the ellipse. $start: It specifies the start point of the ellipse. $end: It specifies the end point of the ellipse. Return Value: This function returns TRUE on success. Exceptions: This function throws ImagickException on error. Below given programs illustrate the ImagickDraw::ellipse() 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, 'purple'); // Create a new ImagickDraw object $draw = new ImagickDraw(); // Draw a ellipse $draw->ellipse(125, 70, 100, 50, 0, 360); // 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, 'brown'); // Create a new ImagickDraw object $draw = new ImagickDraw(); // Draw a black ellipse $draw->ellipse(400, 120, 200, 100, 0, 360); // Set the FillColor to green $draw->setFillColor('green'); // Draw a green ellipse $draw->ellipse(400, 120, 150, 90, 0, 360); // 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.ellipse.php Comment More infoAdvertise with us Next Article PHP | GmagickDraw ellipse() function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | GmagickDraw ellipse() function The GmagickDraw::ellipse() function is an inbuilt function in PHP which is used to draw an ellipse on the image. Syntax: GmagickDraw GmagickDraw::ellipse( float $ox, float $oy, float $rx, float $ry, float $start, float $end ) Parameters: This function accepts six parameters as mentioned above and de 2 min read PHP | ImagickDraw bezier() Function The ImagickDraw::bezier() function is an inbuilt function in Imagick library of PHP which is used to draw bezier curve. Syntax: bool ImagickDraw::bezier( $coordinates ) Parameters: This function accepts a single parameter as the multidimensional array which takes the points through which curve is to 1 min read PHP | ImagickDraw bezier() Function The ImagickDraw::bezier() function is an inbuilt function in Imagick library of PHP which is used to draw bezier curve. Syntax: bool ImagickDraw::bezier( $coordinates ) Parameters: This function accepts a single parameter as the multidimensional array which takes the points through which curve is to 1 min read PHP | ImagickDraw clone() Function The ImagickDraw::clone() function is an inbuilt function in PHP which is used to make an exact copy of the specified ImagickDraw object. Syntax: ImagickDraw ImagickDraw::clone( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns the exact copy of the s 2 min read PHP | ImagickDraw circle() Function The ImagickDraw::circle() function is an inbuilt function in Imagick library of PHP which is used to draw a circle. Syntax: bool ImagickDraw::circle( $ox, $oy, $px, $py ) Parameters: This function accepts four parameters as mentioned above and described below: $ox: This parameter takes the value of 1 min read PHP | ImagickDraw circle() Function The ImagickDraw::circle() function is an inbuilt function in Imagick library of PHP which is used to draw a circle. Syntax: bool ImagickDraw::circle( $ox, $oy, $px, $py ) Parameters: This function accepts four parameters as mentioned above and described below: $ox: This parameter takes the value of 1 min read Like