Browse docsui.circle
On this page
API method

ui.circle

Draws a circle and returns its runtime handle.

Syntax

Atlas Script
ui.circle(x, y, radius, color?, thickness?, filled?, id?)

Parameters

x
Horizontal component or X coordinate for the requested operation.
y
Vertical component or Y coordinate for the requested operation.
radius
Circle radius in the coordinate units used by the current overlay.
color Optional
Atlas RGB color value used by the requested visual or feedback operation.
thickness Optional
Line or outline thickness in the current overlay coordinate units.
filled Optional
Optional boolean that fills the requested shape when true; false draws only its outline.
id Optional
Optional identifier used by this API to keep the selected touch point or drawing stable across calls. See Remarks for the method-specific accepted range or format.

Return value

Returns a value to keep in a var variable.

Remarks

Draws a circle and returns its runtime handle. Color is optional (default white), thickness defaults to 2 pixels, filled defaults false, and an optional seventh ID string creates a replaceable stable handle. x/y are normalized frame fractions; radius is a fraction of frame height.

Examples

Draw normalized video shapes.atlas
event on_frame() {
    ui.rect(0.30, 0.30, 0.40, 0.40, rgb.cyan, 2, false);
    ui.line(0.50, 0.30, 0.50, 0.70, rgb.yellow, 2);
    ui.circle(0.50, 0.50, 0.10, rgb.lime, 2, false);
}
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.