Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

downloadAsImage

downloadAsImage(sigma, opts?): Promise<void>

Defined in: packages/export-image/src/downloadAsImage.ts:11

This function takes a Sigma instance, draws the stage canvas using drawOnCanvas, and then downloads a local image file from the canvas. Accepted formats are “image/png” and “image/jpeg”.

Parameters

sigma

Sigma

opts?

Partial<ToImageOptions> = {}

Returns

Promise<void>