Skip to content

drawCircle

Draws an unfilled circle outline around a specific center point.

ui.drawCircle(center, radius, color, segments, thickness)

This function renders the outline of a 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 color and opacity of the outline.
segmentsintegerNo0 (Auto)The number of vertices used to draw the circle. Higher values result in smoother curves.
thicknessnumberNo1.0The width of the outline stroke in pixels.
  • None

Draw a standard white circle.

local center = vec2(100, 100)
local radius = 50
-- draw a white circle with default smoothness
ui.drawCircle(center, radius, rgbm.colors.white)