You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Graphics Library > drawArc

9.2 drawArc

gc:drawArc(x, y, width, height, startAngle, arcAngle)

Draws an arc in the rectangle with upper left corner (x,y) and pixel width and height. Both the width and height must be 0. The arc is drawn beginning at startAngle degrees and continues for endAngle degrees. Zero degrees points to the right, and 90 degrees points up (standard mathematical practice but worth mentioning since the y axis is inverted).

To draw a circle, the width and height must be equal in length, and the start and end angles must be 0 and 360. If the width and height are different lengths, this routine draws an oval.

Introduced in platform.apiLevel = '1.0'