From 7ba59a9e411c0b01f1bd43af5e448a2d0436e75d Mon Sep 17 00:00:00 2001 From: ian-wd <54297307+ian-wd@users.noreply.github.com> Date: Thu, 15 Jun 2023 18:13:52 +0800 Subject: [PATCH] feat: expose "getBase64()" method (#25) --- src/index.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index b00d7edc..92971f55 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -149,6 +149,24 @@ export default class RNSketchCanvas extends React.Component< } } + getBase64( + imageType: string, + transparent: boolean, + includeImage: boolean, + includeText: boolean, + cropToImageSize: boolean, + callback: () => void, + ) { + return this._sketchCanvas.getBase64( + imageType, + transparent, + includeImage, + includeText, + cropToImageSize, + callback, + ); + } + nextStrokeWidth() { if ( (this.state.strokeWidth >= (this.props.maxStrokeWidth || 0) &&