DrawRectGradient

Enqueue a filled rectangle with gradient in the current build buffer.

Syntax

Susano.DrawRectGradient(x, y, w, h, 
    r1, g1, b1[, a1], 
    r2, g2, b2[, a2],
    r3, g3, b3[, a3],
    r4, g4, b4[, a4],
    rounding
) -> void

Parameters

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

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

r1, g1, b1 (number): Color in [0..1].

r2, g2, b2 (number): Color in [0..1].

r3, g3, b3 (number): Color in [0..1].

r4, g4, b4 (number): Color in [0..1].

a1, a2, a3, a4 (number, optional): Alpha in [0..1]. Default: 1.0

rounding (number): Rounding, 0 for no rounding

Return(s)

None

Behavior

Appends a filled rectangle outline with gradient to the build buffer.

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

Example(s)

Last updated