DRAWING FUNCTIONS

DrawCircle

Draws a circle outline.

Syntax

ONYX.DrawCircle(x, y, radius, filled, r, g, b, a, thickness, segments)

Parameters

  • x, y (number) — Centre position in pixels.
  • radius (number) — Radius in pixels.
  • filled (boolean) — true for a filled circle, false for an outline.
  • r, g, b (number) — Colour in [0, 1].
  • a (number (optional)) — Alpha; default 1.
  • thickness (number (optional)) — Outline thickness; default 1.
  • segments (number (optional)) — Segment count; default 32.

Return(s)

None

Behavior

  • Appends a circle to the build buffer and is visible after SubmitFrame.

Example(s)

ONYX.BeginFrame()
ONYX.DrawCircle(240, 240, 60, true, 0.55, 0.35, 0.8, 1)
ONYX.SubmitFrame()