The imagefilledpolygon() function is an inbuilt function in PHP which is used to draw a filled polygon. This function Returns TRUE on success and returns FALSE otherwise.
bool imagefilledpolygon( $image, $points, $num_points, $color )
Parameters: This function accepts four parameters as mentioned above and described below:
- $image: The imagecreatetruecolor() function is used to create a blank image in a given size.
- $points: This parameter is used to hold the consecutive vertices of polygon.
- $num_points: This parameter contains total number of vertices in a polgon. It must be greater then 3, because minimum three vertices required to create a polygon.
- $color: This variable contains the filled color identifier. A color identifier created with imagecolorallocate() function.
Return Value: This function returns TRUE on success or FALSE on failure.
Below programs illustrate the imagefilledpolygon() function in PHP.
- PHP | Imagick addNoiseImage() Function
- HTML | <s> Tag
- HTML | <var> Tag
- HTML | <samp> Tag
- HTML 5 | <wbr> Tag
- HTML | <u> Tag
- Difference between bindParam and bindValue in PHP
- HTML5 | <meter> Tag
- HTML | <colgroup> Tag
- What is the difference between the | and || or operator in php?
- What is the difference between public, private, and protected in PHP?
- CSS | user-select Property
- HTML 5 | <progress> Tag
- HTML 5 | <bdi> Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.