Changes

Jump to navigation Jump to search

gc:fillArc

1,439 bytes added, 07:25, 6 August 2011
Created page with "__NOTOC__ gc:'''fillArc''' is a function that is part of gc (Graphics Context). Draws a color-filled arc in the rectangle with upper left corner (x,y) and ..."
__NOTOC__

gc:'''fillArc''' is a function that is part of [[:Category:gc|gc]] (Graphics Context).

Draws a color-filled arc in the rectangle with upper left corner (x,y) and pixel ''width'' and ''height''. The arc is drawn beginning at ''startAngle'' degrees and ending at ''endAngle''.<br />
Zero degrees points to the right and 90 degrees points up (standard mathematical practice but worth mentioning since the y axis is inverted).

{{Since|3.0}}

== Syntax ==
gc:'''fillArc'''(x, y, width, height, start angle, finish angle)

{| class="wikitable"
|-
! Parameter !! Type !! Description
|-
| <u><center>x</center></u> || number || The x-coordinate of the upper-left point
|-
| <u><center>y</center></u> || number || The x-coordinate of the upper-left point
|-
| <u><center>width</center></u> || number || Width of the rectangle containing the arc
|-
| <u><center>height</center></u> || number || Height of the rectangle containing the arc
|-
| <u><center>start angle</center></u> || number || start angle
|-
| <u><center>finish angle</center></u> || number || finish angle
|}

== Example ==
<syntaxhighlight>gc:fillArc(10, 10, 20, 30, 0, 120)</syntaxhighlight>

== Good to know ==
To draw a circle, the width and height must be equal length and the start and end angles must be 0 and 360. If width and height are different lengths, this routine will draw an oval.

== See Also ==
[[gc:drawArc]]

<br /><br />

[[Category:gc]]

Navigation menu