Skip to content

drawCircleFilled

Draws a solid, filled circle around a specific center point.

ui.drawCircleFilled(center, radius, color, segments)

This function renders a filled circle. The smoothness of the circle depends on the number of segments used to draw it.

ParameterTypeRequiredDefaultDescription
centervec2Yes-Screen coordinates for the center of the circle.
radiusnumberYes-The radius of the circle in pixels.
colorrgbmYes-The fill color and opacity.
segmentsintegerNo0 (Auto)The number of vertices used to draw the circle. Higher values result in smoother curves.
  • None

Draw a solid green circle.

local center = vec2(100, 100)
local radius = 50
local green = rgbm(0, 1, 0, 1)
-- draw a filled green circle
ui.drawCircleFilled(center, radius, green)