imagearc() draws an arc of circle centered at the given coordinates.
PHP imagearc() function has the following syntax.
bool imagearc(resource $image , int $cx , int $cy , int $width , int $height , int $start , int $end , int $color )
PHP imagearc() function has the following parameters.
Returns TRUE on success or FALSE on failure.
Drawing a circle with imagearc()
<?php/*from ww w .jav a2s. c o m*/
$img = imagecreatetruecolor(200, 200);// create a 200*200 image
$blue = imagecolorallocate($img, 0, 0, 255);// colors
// draw the head
imagearc($img, 140, 75, 50, 50, 0, 360, $blue);
// output image in the browser
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
?>