Circle

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

_circle(cx, cy, radius)

_circle is used to draw a circle.

Info This function may only be called within a canvas draw callback

Return value

This function won't return any value.

Arguments

# Argument Type Description
1 cx Number Left point of the center of the circle.
2 cy Number Top point of the center of the circle.
3 radius Number Radius of the circle in pixels.

Example

canvas_id = canvas_add(0, 0, 200, 200, function()
  -- Create a circle
  _circle(100, 100, 100)

  _fill("red")
end)
Output of code above