From c0252a3608899d01fe8d90023c504a9d68255b06 Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Sat, 30 Apr 2022 09:20:28 -0700 Subject: [PATCH] docs: update readme --- README.md | 16 ++++++++-------- src/components/SketchCanvas/types.ts | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e22f324..911ceaa 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,14 @@ const styles = StyleSheet.create({ | Method | Description| | ------------------ | -------- | -| `reset` | Clear all the paths. | -| `undo` | Undo | -| `redo` | Redo | -| `toBase64` | Get the base64 of image. | -| `toImage` | Get a snapshot from the canvas in the surface. | -| `toSvg` | Get the svg string of all paths. | -| `toPoints` | Get the array of point groups that got drawn in the canvas. | -| `addPoints` | Draws from an array of point groups. | +| `reset()` | Clear all the paths. | +| `undo()` | Undo | +| `redo()` | Redo | +| `toBase64(format, quality)` | Get the base64 of image. | +| `toImage()` | Get a snapshot from the canvas in the surface. | +| `toSvg(width: number, height: number, backgroundColor?: string)` | Get the svg string of all paths. | +| `toPoints()` | Get the array of point groups that got drawn in the canvas. | +| `addPoints(points: { x: number, y: number }[][])` | Draws from an array of point groups. | ## Contributing diff --git a/src/components/SketchCanvas/types.ts b/src/components/SketchCanvas/types.ts index 5bb69f1..6756cc7 100644 --- a/src/components/SketchCanvas/types.ts +++ b/src/components/SketchCanvas/types.ts @@ -17,6 +17,7 @@ export interface SketchCanvasRef { toImage: () => SkImage | undefined; toSvg: (width: number, height: number, backgroundColor?: string) => string; toPoints: () => Point[][]; + addPoints: (points: Point[][]) => void; } export interface SketchCanvasProps {