CANVAS:fill_circle
CANVAS:fill_circle(x, y, radius, color)
Draw a filled circle defined by the center position (x,y), with radius radius, and with the color color.
Parameters
| Parameter | Type | Description |
|---|---|---|
x | #number | The x position of the center of the circle. |
y | #number | The y position of the center of the circle. |
radius | #number | The radius of the circle. |
color | #number | An RGB color value as an integer value. |
Example
-- Fill a circle on the canvas with the color red
function RedBalloon(name)
local canvas = gre.get_canvas(name)
local size = canvas:get_dimensions()
local x = size.width / 2
local y = size.height / 2
local radius = size.width / 6
canvas:fill_circle(x, y, radius, 0xff2244)
end