Type Function
Library display.*
Return value ShapeObject
Revision 2017.3077
Keywords circle, vector object
See also Shapes — Paths, Fills, Strokes (guide)
Display Objects (guide)


Creates a circle with radius radius centered at specified coordinates (xCenter, yCenter). The local origin is at the center of the circle and the anchor point is initialized to this local origin.


display.newCircle( [parent,] xCenter, yCenter, radius )
parent (optional)

GroupObject. An optional display group in which to insert the circle.

xCenter / yCenter (required)

Numbers. The x and y coordinates for the center of the circle.

radius (required)

Number. The radius for the circle (determines the size of the circle). The radius must be greater than 0.


(Inherits properties from ShapeObject)

Shape objects have a path property that exposes properties of the path:


Number. Radius of the circle.


local myCircle = display.newCircle( 100, 100, 30 )
myCircle:setFillColor( 0.5 )
myCircle.strokeWidth = 5
myCircle:setStrokeColor( 1, 0, 0 )