Skip to main content
Version: Alpha 1

Brush

Sets the active brush for subsequent drawing commands. This object does not draw anything itself, but it affects how other objects like Line and Rectangle are rendered.

Parameters

NameTypeDescription
typestringThe name of the brush to use (e.g., 'pen', 'spray').
colorstringThe color of the brush.
sizeNumberThe size or thickness of the brush.

Example

This example sets the brush to a large, red spray brush and then draws a line with it.

Brush(type: 'spray', color: 'red', size: 20),
Line(x: -100, y: 0, x2: 100, y2: 0)