DrawLine

Enqueue a line in the current build buffer.

Syntax

Susano.DrawLine(x1, y1, x2, y2, r, g, b[, a], thickness) -> void

Parameters

x1, y1 (number): Start position in pixels.

x2, y2 (number): End position in pixels.

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

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

thickness (number): Line thickness in pixels.

Return(s)

None

Behavior

Appends a line command to the build buffer.

Not rendered until Susano.SubmitFrame() is called.

The submitted frame persists on screen until the next Susano.SubmitFrame().

Example(s)

Susano.BeginFrame()
Susano.DrawLine(100,100, 300,200, 1,0,0, 1, 2)
Susano.SubmitFrame()

Last updated