Skip to content

getImageDataUrl

getImageDataUrl(canvas, page, shapes, options): Promise<string>

Get Base64-encoded image data of the given page.

Parameters

• canvas: Canvas

The editor’s canvas

• page: Page

The page to draw.

• shapes: Shape[]

The shapes to draw in the page. If empty, render all shapes in the page.

• options: Partial<ExportImageOptions>

The options for drawing.

Returns

Promise<string>

The Base64-encoded image data of the shapes.

Source

index.ts:109