Query: imagearc
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
IMAGEARC(3) 1 IMAGEARC(3) imagearc - Draws an arcSYNOPSISbool imagearc (resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color)DESCRIPTIONimagearc(3) draws an arc of circle centered at the given coordinates.PARAMETERSo $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $cx - x-coordinate of the center. o $cy - y-coordinate of the center. o $width - The arc width. o $height - The arc height. o $start - The arc start angle, in degrees. o $end - The arc end angle, in degrees. 0o is located at the three-o'clock position, and the arc is drawn clockwise. o $color - A color identifier created with imagecolorallocate(3).RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESExample #1 Drawing a circle with imagearc(3) <?php // create a 200*200 image $img = imagecreatetruecolor(200, 200); // allocate some colors $white = imagecolorallocate($img, 255, 255, 255); $red = imagecolorallocate($img, 255, 0, 0); $green = imagecolorallocate($img, 0, 255, 0); $blue = imagecolorallocate($img, 0, 0, 255); // draw the head imagearc($img, 100, 100, 200, 200, 0, 360, $white); // mouth imagearc($img, 100, 100, 150, 150, 25, 155, $red); // left and then the right eye imagearc($img, 60, 75, 50, 50, 0, 360, $green); imagearc($img, 140, 75, 50, 50, 0, 360, $blue); // output image in the browser header("Content-type: image/png"); imagepng($img); // free memory imagedestroy($img); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Drawing a circle with imagearc()SEE ALSOimagefilledarc(3), imageellipse(3), imagefilledellipse(3). PHP Documentation Group IMAGEARC(3)
Related Man Pages |
---|
imagecolorallocate(3) - php |
imageantialias(3) - php |
imagearc(3) - php |
imagefilledarc(3) - php |
imagewbmp(3) - php |
Similar Topics in the Unix Linux Community |
---|
Print a key with its all values using awk/others |
Divide numbers into intervals |
Need help filling in ranges |
Group by in UNIX |
Find duplicates in file with line numbers |