GD arc()
syntax: |
gd.arc(centerX, centerY, width, height, startDegree, endDegree, color) gd.arc(centerPoint, width, height, startDegree, endDegree, color) |
where: |
centerX - horizontal position of center.
centerY - vertical position of center.
centerPoint - center point specification.
height - height of arc.
startDegree - degree value of starting position in standard coordinate plane. Values greater than 360 are interpreted as modulo 360.
endDegree - degree value of ending position in standard coordinate plane. Values greater than 360 are interpreted as modulo 360.
color - color index to use for arc, or one of the strings "styled", "brushed", "styledBrushed".
|
return: |
void.
|
description: |
This method draws an arc in the specified format. The center position is specified, along with the width and the height. The arc is then draw between the two given degree values. A full ellipse can be drawn from degree 0 to degree 360, and a circle can be drawn in the same manner while setting width and height to be the same. If there is an out-of-bounds error or some other error, then the arc is not drawn at all.
|
see: |
#link <gd>
|
example: |
// Draw a circle with a diameter of 16 pixels // in the middle of the image var gd = new GD(65, 65); gd.arc( [32,32], 16, 16, 0, 360, 0 ); |