Type Function Library display.* Return value ShapeObject Revision Release 2022.3683 Keywords circle, vector object See also Shapes — Paths, Fills, Strokes (guide) Display Objects (guide)
Creates a circle with 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.
Vector circles of very small radius 10
for example)
display.newCircle( [parent,] xCenter, yCenter, radius )
GroupObject. An optional display group in which to insert the circle.
Numbers. The x and y coordinates for the center of the circle.
Number. The radius for the circle. This 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 )