![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
imagefilledellipse() function in PHP
The imagefilledellipse() function is used to draw a filled ellipse.
Syntax
imagefilledellipse( $img, $cx, $cy, $width, $height, $color )
Parameters
img This creates a blank image with imagecreatetruecolor()
cx x-coordinate of the center.
cy y-coordinate of the center.
width The ellipse width.
height The ellipse height.
color The fill color.
Return
The imagefilledellipse() function returns TRUE on success or FALSE on failure.
Example
The following is an example:
<?php $img = imagecreatetruecolor(450, 290); $bgColor = imagecolorallocate($img, 140, 180, 140); imagefill($img, 0, 0, $bgColor); $ellipse = imagecolorallocate($img, 120, 50, 70); imagefilledellipse($img, 225, 150, 400, 250, $ellipse); header("Content-type: image/png"); imagepng($img); ?>
Output
The following is the output:
Advertisements