Class: CanvasSnipper
Extra-Helpers.CanvasSnipper
Properties
Debug
▪ Static
Debug: boolean
= false
Defined in
webgi/src/extras/canvasSnipper.ts:22
Methods
GetClonedCanvas
▸ Static
GetClonedCanvas(canvas
, __namedParameters
): Promise
<HTMLCanvasElement
>
Parameters
Name | Type |
---|---|
canvas | HTMLCanvasElement |
__namedParameters | SnipOptions |
Returns
Promise
<HTMLCanvasElement
>
Defined in
webgi/src/extras/canvasSnipper.ts:23
GetDataUrl
▸ Static
GetDataUrl(canvas
, __namedParameters
): Promise
<string
>
Parameters
Name | Type |
---|---|
canvas | HTMLCanvasElement |
__namedParameters | SnipOptions |
Returns
Promise
<string
>
Defined in
webgi/src/extras/canvasSnipper.ts:101
GetImage
▸ Static
GetImage(canvas
, __namedParameters?
): Promise
<HTMLImageElement
>
Parameters
Name | Type |
---|---|
canvas | HTMLCanvasElement |
__namedParameters | SnipOptions |
Returns
Promise
<HTMLImageElement
>
Defined in
webgi/src/extras/canvasSnipper.ts:109
GetBlob
▸ Static
GetBlob(canvas
, options?
): Promise
<Blob
>
Parameters
Name | Type |
---|---|
canvas | HTMLCanvasElement |
options | SnipOptions |
Returns
Promise
<Blob
>
Defined in
webgi/src/extras/canvasSnipper.ts:120
GetFile
▸ Static
GetFile(canvas
, filename?
, options?
): Promise
<string
| File
>
Parameters
Name | Type | Default value |
---|---|---|
canvas | HTMLCanvasElement | undefined |
filename | string | 'image.png' |
options | SnipOptions | {} |
Returns
Promise
<string
| File
>
Defined in
webgi/src/extras/canvasSnipper.ts:134
Constructors
constructor
• new CanvasSnipper()