createCircle()
Purpose
Creates a circle to be drawn with drawShape()
Description
Creates a circle with centre origin to be drawn at the specified x and y location with the specified radius and number of vertices
Syntax
shape = createCircle( x, y, radius, vertices )
Arguments
shape Handle to store the newly created circle
x Horizontal screen position of the circle
y Vertical screen position of the circle
radius Distance from the centre of the circle to the edge (in pixels)
vertices Number of vertices (points) making up the circle
Example
// draw a multicoloured circle on screen
shape_1 = createCircle( gwidth() / 2, gheight() / 2, 500, 360 )
for i = 0 to 360 loop
setVertexColour( shape_1, i, { random( 1.0 ), random( 1.0 ), random( 1.0 ), 1 } )
repeat
drawShape( shape_1 )
update()
sleep( 3 )
Associated Commands
copyShape(), createBox(), createCurve(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()