DrawRectFilled

Draw a filled rectangle with optional rounding.

Syntax

Susano.DrawRectFilled(x, y, w, h, r, g, b[, a][, 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.

rounding (number, optional): Corner rounding in pixels. Default: 0.0.

Return(s)

None

Behavior

Appends a filled rectangle to the build buffer. Visible after Susano.SubmitFrame() or on next present if auto-frame is enabled.

Example(s)

Susano.BeginFrame()
Susano.DrawRectFilled(100, 100, 200, 50, 0.2, 0.2, 0.8, 0.9, 6)
Susano.SubmitFrame()