DRAWING FUNCTIONS

DrawRoundedRect

Draws a rectangle with rounded corners.

Syntax

ONYX.DrawRoundedRect(x, y, w, h, rounding, r, g, b, a, thickness)

Parameters

  • x, y (number) — Top-left corner in pixels.
  • w, h (number) — Width and height.
  • rounding (number) — Corner rounding in pixels.
  • r, g, b (number) — Colour; floats or 0-255 integers.
  • a (number (optional)) — Alpha; default 1.
  • thickness (number (optional)) — Border thickness; default 1.

Return(s)

None

Behavior

  • Convenience wrapper around DrawRect where rounding is a required argument.

Example(s)

ONYX.BeginFrame()
ONYX.DrawRoundedRect(100, 100, 260, 60, 12, 0.6, 0.45, 0.85, 1, 2)
ONYX.SubmitFrame()