English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
imagearc — used to draw an elliptical arc.
bool imagearc ( resource $image , int $cx , int $cy , int $w , int $h , int $s , int $e , int $color )
imagearc() draws an elliptical arc at the center cx, cy (top left corner of the image is 0, 0) in the image represented by image.
w and h specify the width and height of the ellipse, and the starting and ending points are specified by the s and e parameters in degrees. 0° is located at the 3 o'clock position, and is drawn in a clockwise direction.
<?php $img = imagecreatetruecolor(200, 200);// create a 200*200 image $white = imagecolorallocate($img, 255, 255, 255); // color // draw an elliptical arc imagearc($img, 140, 75, 50, 50, 0, 360, $white); // browser output image header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?>