DrawRect
Draw a rectangle outline with optional rounding.
Syntax
Susano.DrawRect(x, y, w, h, r, g, b[, a], thickness[, rounding]) -> void
Parameters
x, y (number): Top-left corner in pixels.
w, h (number): Width and height in pixels.
r, g, b (number): Color. Accepts 0..1 floats or 0..255 integers (auto-detected).
a (number, optional): Alpha. Default: 1.0.
thickness (number, optional): Border thickness in pixels. Default: 1.0.
rounding (number, optional): Corner rounding in pixels. Default: 0.0.
Return(s)
None
Behavior
Appends a rectangle outline to the build buffer. Visible after Susano.SubmitFrame() or on next present if auto-frame is enabled. Persists until next submit.
Example(s)
Susano.BeginFrame()
Susano.DrawRect(320, 100, 120, 80, 0, 1, 0, 1, 1.5)
-- With rounding
Susano.DrawRect(320, 200, 120, 80, 255, 0, 0, 255, 1.5, 8)
Susano.SubmitFrame()