DRAWING FUNCTIONS
DrawRectFilled
Draws a filled rectangle.
Syntax
ONYX.DrawRectFilled(x, y, w, h, r, g, b, a, rounding)Parameters
x, y(number) — Top-left corner in pixels.w, h(number) — Width and height.r, g, b(number) — Colour; floats or 0-255 integers.a(number (optional)) — Alpha; default 1.rounding(number (optional)) — Corner rounding; default 0.
Return(s)
None
Behavior
- Appends a filled rectangle to the build buffer.
- Visible after SubmitFrame, or on the next present when auto-frame is enabled.
Example(s)
ONYX.BeginFrame()
ONYX.DrawRectFilled(100, 100, 200, 60, 0.1, 0.08, 0.15, 0.9, 8)
ONYX.SubmitFrame()