Skip to content

Interface: ISkiaNAPICanvas

Table of contents

Methods

Methods

encodeSync

encodeSync(format, quality?): any

Parameters

NameType
format"webp" | "jpeg"
quality?number

Returns

any

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:25

encodeSync(format): any

Parameters

NameType
format"png"

Returns

any

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:26


encode

encode(format, quality?): Promise<any>

Parameters

NameType
formatstring
quality?number

Returns

Promise<any>

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:28

encode(format): Promise<any>

Parameters

NameType
format"png"

Returns

Promise<any>

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:29


toBuffer

toBuffer(mime): any

Parameters

NameType
mime"image/png"

Returns

any

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:31

toBuffer(mime, quality?): any

Parameters

NameType
mimestring
quality?number

Returns

any

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:32


toDataURL

toDataURL(mime?): string

Parameters

NameType
mime?"image/png"

Returns

string

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:34

toDataURL(mime, quality?): string

Parameters

NameType
mimestring
quality?number

Returns

string

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:35


toDataURLAsync

toDataURLAsync(mime?): Promise<string>

Parameters

NameType
mime?"image/png"

Returns

Promise<string>

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:37

toDataURLAsync(mime, quality?): Promise<string>

Parameters

NameType
mimestring
quality?number

Returns

Promise<string>

Defined in

leafer/packages/interface/src/canvas/ISkiaCanvas.ts:38

Released under the MIT License.