The imagearc() function is an inbuilt function in PHP which is used to create an arc of a circle centered at the given coordinates. This function returns true on success or false on failure.
bool imagearc( $image, $cx, $cy, $width, $height, $start, $end, $color )
Parameters: This function accepts eight 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: It is used to set x-coordinate of the center.
- $cy: It is used to set y-coordinate of the center.
- $width: The width of arc.
- $height: The height of arc.
- $start: It is used to set the arc start angle, in degrees.
- $end: It is used to set the arc end angle, in degrees. 0° is located at the three-o’clock position, and the arc is drawn clockwise.
- $color: It sets the color of image. A color identifier created by imagecolorallocate() function.
Return Value: This function returns true on success or false on failure.
Below programs illustrate the imagearc() function in PHP.
- PHP | imagepolygon() Function
- PHP | imagefilledellipse() Function
- PHP | imagefilledpolygon() Function
- How to get the function name inside a function in PHP ?
- p5.js | str() function
- D3.js | d3.map.set() Function
- p5.js | min() function
- PHP | abs() Function
- PHP | Ds\Map xor() Function
- PHP | pos() Function
- PHP | key() Function
- p5.js | hue() function
- PHP | each() Function
- PHP | sin( ) Function
- p5.js | hex() function
- PHP | end() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.