 |
imagearc (PHP 3, PHP 4, PHP 5) imagearc -- Draws an arc Descrizionebool imagearc ( resource image, int cx, int cy, int width, int height, int start, int end, int color )
imagearc() draws an arc of circle centered at the given
coordinates.
Elenco dei parametri
-
image
An image resource, returned by one of the image creation functions,
such as imagecreatetruecolor(). - cx
x-coordinate of the center
- cy
y-coordinate of the center
- width
The arc width
- height
The arc height
- start
The arc start angle, in degrees.
- end
The arc end angle, in degrees.
0° is located at the three-o'clock position, and the arc is drawn
clockwise.
- color
A color identifier created with
imagecolorallocate()
Valori restituiti
Restituisce TRUE in caso di successo, FALSE in caso di fallimento.
Esempi
Esempio 1. Drawing a circle with imagearc()
<?php
// create a 200*200 image $img = imagecreatetruecolor(200, 200);
// allocate some colors $white = imagecolorallocate($img, 255, 255, 255); $black = imagecolorallocate($img, 0, 0, 0);
// draw a black circle imagearc($img, 100, 100, 150, 150, 0, 360, $black);
// output image in the browser header("Content-type: image/png"); imagepng($img);
// free memory imagedestroy($img);
?>
|
|
|  |