CanvasRef
Canvas component ref
Extended by
Properties
exportImage
exportImage: (
imageType
,options
?) =>Promise
<string
>
Export the canvas as an image. This returns a promise that resolves to a data URL of the image.
Parameters
• imageType: ExportImageType
The type of image to be exported.
• options?: ExportImageOptions
Options to be applied to the exported image.
Returns
Promise
<string
>
A promise that resolves to a data URL of the image.
Source
packages/react-sketch-canvas/src/Canvas/types.ts:132
exportSvg
exportSvg: () =>
Promise
<string
>
Export the canvas as an SVG. This returns a promise that resolves to a string of the SVG.
Returns
Promise
<string
>
A promise that resolves to a string of the SVG.