Skip to main content

Class: CanvasSnipper

Extra-Helpers.CanvasSnipper

Methods

GetDataUrl

Static GetDataUrl(canvas, __namedParameters): Promise<string>

Parameters

NameType
canvasHTMLCanvasElement
__namedParametersSnipOptions

Returns

Promise<string>

Defined in

webgi/src/extras/canvasSnipper.ts:22


GetImage

Static GetImage(canvas, options?): Promise<HTMLImageElement>

Parameters

NameType
canvasHTMLCanvasElement
optionsSnipOptions

Returns

Promise<HTMLImageElement>

Defined in

webgi/src/extras/canvasSnipper.ts:105


GetBlob

Static GetBlob(canvas, options?): Promise<Blob>

Parameters

NameType
canvasHTMLCanvasElement
optionsSnipOptions

Returns

Promise<Blob>

Defined in

webgi/src/extras/canvasSnipper.ts:116


GetFile

Static GetFile(canvas, filename?, options?): Promise<string | File>

Parameters

NameTypeDefault value
canvasHTMLCanvasElementundefined
filenamestring'image.png'
optionsSnipOptions{}

Returns

Promise<string | File>

Defined in

webgi/src/extras/canvasSnipper.ts:120

Constructors

constructor

new CanvasSnipper()