Canvacord

CanvasHelper

extendsEncodable

Creates a new CanvasHelper instance.

new CanvasHelper(width, height)
ParameterTypeDescriptionOptional
width

The width of the canvas

height

The height of the canvas

Properties

height

The height of the canvas

Type:number

steps

The steps to apply to the canvas.

width

The width of the canvas

Type:number

Methods

encode();

Encodes the canvas to a buffer.

Returns:Promise<Buffer>

getFinalCanvas();

Returns the canvas instance by applying the steps.

Returns:Promise<Canvas>

process(canvas, ctx);

Processes the steps and applies them to the canvas.

ParameterTypeOptional
canvas
Canvas
ctx
SKRSContext2D
Returns:Promise<void>