The imageellipse() function is an inbuilt function in PHP which is used to draw an ellipse. This function returns TRUE on success or FALSE on failure.
bool imageellipse( $image, $cx, $cy, $width, $height, $color )
Parameters: This function accepts six parameters as mentioned above and described below:
- $image: It is returned by one of the image creation functions, such as imagecreatetruecolor(). It is used to create size of image.
- $cx: x-coordinate of the center.
- $cy: y-coordinate of the center.
- $width: The ellipse width.
- $height: The ellipse height.
- $color: It sets the color of ellipse. A color identifier created by imagecolorallocate() function.
Return Value: It returns TRUE on success or FALSE on failure.
Below programs illustrate the imageellipse() function in PHP:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.