DrawRect

Enqueue a rectangle outline in the current build buffer.

Syntax

Susano.DrawRect(x, y, w, h, r, g, b[, a], thickness) -> void

Parameters

x, y (number): Top-left corner in pixels.

w, h (number): Width and height in pixels.

r, g, b (number): Color in [0..1].

a (number, optional): Alpha in [0..1]. Default: 1.0.

thickness (number): Border thickness in pixels.

Return(s)

None

Behavior

Appends a rectangle outline to the build buffer.

Visible after Susano.SubmitFrame(). Persists until next submit.

Example(s)

Susano.BeginFrame()
Susano.DrawRect(320,100, 120,80, 0,1,0, 1, 1.5)
Susano.SubmitFrame()

Last updated