Interface: ISkiaNAPICanvas
Table of contents
Methods
Methods
encodeSync
▸ encodeSync(format
, quality?
): any
Parameters
Name | Type |
---|---|
format | "webp" | "jpeg" |
quality? | number |
Returns
any
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:25
▸ encodeSync(format
): any
Parameters
Name | Type |
---|---|
format | "png" |
Returns
any
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:26
encode
▸ encode(format
, quality?
): Promise
<any
>
Parameters
Name | Type |
---|---|
format | string |
quality? | number |
Returns
Promise
<any
>
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:28
▸ encode(format
): Promise
<any
>
Parameters
Name | Type |
---|---|
format | "png" |
Returns
Promise
<any
>
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:29
toBuffer
▸ toBuffer(mime
): any
Parameters
Name | Type |
---|---|
mime | "image/png" |
Returns
any
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:31
▸ toBuffer(mime
, quality?
): any
Parameters
Name | Type |
---|---|
mime | string |
quality? | number |
Returns
any
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:32
toDataURL
▸ toDataURL(mime?
): string
Parameters
Name | Type |
---|---|
mime? | "image/png" |
Returns
string
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:34
▸ toDataURL(mime
, quality?
): string
Parameters
Name | Type |
---|---|
mime | string |
quality? | number |
Returns
string
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:35
toDataURLAsync
▸ toDataURLAsync(mime?
): Promise
<string
>
Parameters
Name | Type |
---|---|
mime? | "image/png" |
Returns
Promise
<string
>
Defined in
leafer/packages/interface/src/canvas/ISkiaCanvas.ts:37
▸ toDataURLAsync(mime
, quality?
): Promise
<string
>
Parameters
Name | Type |
---|---|
mime | string |
quality? | number |
Returns
Promise
<string
>