drawCircleFilled
Draws a solid, filled circle around a specific center point.
Signature
Section titled “Signature”ui.drawCircleFilled(center, radius, color, segments)Description
Section titled “Description”This function renders a filled circle. The smoothness of the circle depends on the number of segments used to draw it.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
center | vec2 | Yes | - | Screen coordinates for the center of the circle. |
radius | number | Yes | - | The radius of the circle in pixels. |
color | rgbm | Yes | - | The fill color and opacity. |
segments | integer | No | 0 (Auto) | The number of vertices used to draw the circle. Higher values result in smoother curves. |
Return Values
Section titled “Return Values”- None
Examples
Section titled “Examples”Draw a solid green circle.
local center = vec2(100, 100)local radius = 50local green = rgbm(0, 1, 0, 1)
-- draw a filled green circleui.drawCircleFilled(center, radius, green)By lowering the segment count, you can create regular filled polygons.
local center = vec2(200, 100)local radius = 50
-- 6 segments creates a filled hexagonui.drawCircleFilled(center, radius, rgbm.colors.red, 6)