On this page
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.
colorOptional- Atlas RGB color value used by the requested visual or feedback operation.
thicknessOptional- Line or outline thickness in the current overlay coordinate units.
filledOptional- Optional boolean that fills the requested shape when true; false draws only its outline.
idOptional- 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);
}