English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Elaborazione delle immagini PHP
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 centered at 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, the starting and ending points are specified by the s and e parameters in degrees. 0° is located at the three o'clock position, and is drawn in a clockwise direction.
<?php $img = imagecreatetruecolor(200, 200); // Create a 200x200 image $white = imagecolorallocate($img, 255, 255, 255); // Color // Draw an elliptical arc imagearc($img, 140, 75, 50, 50, 0, 360, $white); // Output image in browser header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?>