★ wanayoo — archive 1999 http://www.php.net/manual/function.imagearc.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Graphics
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Graphics
* GetImageSize
* ImageArc
* ImageChar
* ImageCharUp
* ImageColorAllocate
* ImageColorDeAllocate
* ImageColorAt
* ImageColorClosest
* ImageColorExact
* ImageColorResolve
* ImageGammaCorrect
* ImageColorSet
* ImageColorsForIndex
* ImageColorsTotal
* ImageColorTransparent
* ImageCopy
* ImageCopyResized
* ImageCreate
* ImageCreateFromGIF
* ImageCreateFromJPEG
* ImageCreateFromPNG
* ImageDashedLine
* ImageDestroy
* ImageFill
* ImageFilledPolygon
* ImageFilledRectangle
* ImageFillToBorder
* ImageFontHeight
* ImageFontWidth
* ImageGIF
* ImagePNG
* ImageJPEG
* ImageInterlace
* ImageLine
* ImageLoadFont
* ImagePolygon
* ImagePSBBox
* ImagePSEncodeFont
* ImagePSFreeFont
* ImagePSLoadFont
* ImagePsExtendFont
* ImagePsSlantFont
* ImagePSText
* ImageRectangle
* ImageSetPixel
* ImageString
* ImageStringUp
* ImageSX
* ImageSY
* ImageTTFBBox
* ImageTTFText
* ImageTypes
* read_exif_data
Manual: ImageArc
View the source code for this pageSearch the site



Previous page
 GetImageSize
 Updated
Sat, 12 Aug 2000
ImageChar 
Next page


ImageArc

(unknown)

ImageArc -- Draw a partial ellipse

Description

int imagearc (int im, int cx, int cy, int w, int h, int s, int e, int col)

ImageArc() draws a partial ellipse centered at cx, cy (top left is 0, 0) in the image represented by im. W and h specifies the ellipse's width and height respectively while the start and end points are specified in degrees indicated by the s and e. arguments.


User Contributed Notes: ImageArc


andrea@labo.net
22-Dec-1999 09:53
in php 3.05 (debian 2.1r4) drawing a circle is impossible:
the function imagearc($im,100,100,30,30,0,360,$black) doesn't draw anything, but
imagearc($im,100,100,30,30,0,359,$black)
draws a circle (more or less).



travis@duluth.com
22-Dec-1999 06:36
The wierd thing is that the first two integers tell where to place the "circle".
So for example I first create the "pallet" to place the circle on.
$image = imagecreate(500, 500);
(this makes a huge 500x500 gif :) )
$colorBody = imagecolorallocate($image, 0, 0, 0);
(make the default color of the "pallet" black
$circleColor = imagecolorallocate($image, 255, 0, 255);
(going to make the circle an ugly pink color)
imagearc($image, 250, 250, 300, 300, 0, 360, $circleColor);
Places the image in the center (250,250) and the circle is 300 pixels in diameter.

Hope this helps.

Travis Kent Beste



light@buypages.com
23-Dec-1999 03:36
<PRE>You should note that:
a) the arc is drawn counter-clockwise
b) angle=0 is at the three-o'clock position

hence, 90 == 6 o'clock, 180=9 'oclock etc.
</PRE>



lbattraw@att.com
12-Apr-2000 02:33
Also remember that 0 degrees and 360 degrees are mathematically identical (per note #1); you're essentially specifying the same point if you use 0 and 360 as start and end angles, respectively. It's open to debate whether or not this should be construed as drawing a whole circle or nothing at all...


i_patton@hotmail.com
28-Apr-2000 06:15
I have code that works in creating a picture, and then outputting it to a file (I can tell because the file shows), but none of the commands to draw inside the new gif, including imagearc, work. The picture, no matter what I do, is identical to the original picture. Anybody know why? | Liam |


rolf.winterscheidt@it-mannesmann.de
24-Jul-2000 04:27
How do I get something like ImageFilledArc? I need a partial
filled circle, not the whole thing filled.
Rolf



rupert@complinet.com
02-Aug-2000 12:15
can anyone think of a way of aliasing the curve?

ps; re:filled arc; you're going to have to draw in the radii and then use imagefill()



 About Notes


Previous page
 GetImageSize
 Updated
Sat, 12 Aug 2000
ImageChar 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.