DRAWING FUNCTIONS
DrawBorderRect
Draws a rectangle border with a configurable thickness.
Syntax
ONYX.DrawBorderRect(x, y, w, h, fillR, fillG, fillB, fillA, borderR, borderG, borderB, borderA, borderW, rounding)Parameters
x, y(number) — Top-left corner in pixels.w, h(number) — Width and height in pixels.fillR, fillG, fillB, fillA(number) — Fill colour; floats in [0,1] or integers in [0,255].borderR, borderG, borderB, borderA(number) — Border colour.borderW(number (optional)) — Border thickness in pixels; default 1.rounding(number (optional)) — Corner rounding in pixels; default 0.
Return(s)
None
Behavior
- Draws a filled rectangle first, then an outline on top with the border colour.
- Combines DrawRectFilled and DrawRect in a single call.
Example(s)
ONYX.BeginFrame()
ONYX.DrawBorderRect(100, 100, 260, 60, 0.08, 0.06, 0.1, 1, 0.6, 0.4, 0.8, 1, 1, 8)
ONYX.SubmitFrame()