Skip to content

drawShapesOnCanvas

drawShapesOnCanvas(shapes, canvasElement, darkMode, pageSize, maxCanvasSize, maxScale, scaleAdjust, update, showDOM): void

Draw the shapes on the canvas element

Parameters

• shapes: Shape[]

An array of shapes

• canvasElement: HTMLCanvasElement

A HTML element

• darkMode: boolean= false

A boolean value to indicate dark mode

• pageSize: PageSize= undefined

• maxCanvasSize: number[]= undefined

A number to indicate the maximum size of the canvas

• maxScale: number= 1

• scaleAdjust: number= 1

A number to adjust the scale

• update: boolean= false

A boolean value to indicate whether to update the shapes

• showDOM: boolean= false

A boolean value to indicate whether to update the DOM

Returns

void

Source

packages/core/src/shapes.ts:3660