|
1 | 1 | import * as React from 'react' |
2 | 2 | import { |
3 | | - ViewProperties, |
| 3 | + ViewProps, |
4 | 4 | StyleProp, |
5 | 5 | ViewStyle |
6 | 6 | } from "react-native" |
@@ -87,26 +87,31 @@ export interface SketchCanvasProps { |
87 | 87 | onPathsChange?: (pathsCount: number) => void |
88 | 88 | } |
89 | 89 |
|
90 | | -export class SketchCanvas extends React.Component<SketchCanvasProps & ViewProperties> { |
| 90 | +export class SketchCanvas extends React.Component<SketchCanvasProps & ViewProps> { |
91 | 91 | clear(): void |
92 | 92 | undo(): number |
93 | 93 | addPath(data: Path): void |
94 | 94 | deletePath(id: number): void |
95 | 95 |
|
96 | 96 | /** |
97 | | - * @param imageType "png" or "jpg" |
98 | | - * @param includeImage Set to `true` to include the image loaded from `LocalSourceImage` |
99 | | - * @param includeText Set to `true` to include the text drawn from `Text`. |
100 | | - * @param cropToImageSize Set to `true` to crop output image to the image loaded from `LocalSourceImage` |
| 97 | + * @param {imageType} imageType "png" or "jpg" |
| 98 | + * @param {boolean} transparent |
| 99 | + * @param {string} folder |
| 100 | + * @param {string} filename |
| 101 | + * @param {includeImage} includeImage Set to `true` to include the image loaded from `LocalSourceImage` |
| 102 | + * @param {includeText} includeText Set to `true` to include the text drawn from `Text`. |
| 103 | + * @param {boolean} cropToImageSize Set to `true` to crop output image to the image loaded from `LocalSourceImage` |
101 | 104 | */ |
102 | 105 | save(imageType: ImageType, transparent: boolean, folder: string, filename: string, includeImage: boolean, includeText: boolean, cropToImageSize: boolean): void |
103 | 106 | getPaths(): Path[] |
104 | 107 |
|
105 | 108 | /** |
106 | | - * @param imageType "png" or "jpg" |
107 | | - * @param includeImage Set to `true` to include the image loaded from `LocalSourceImage` |
108 | | - * @param includeText Set to `true` to include the text drawn from `Text`. |
109 | | - * @param cropToImageSize Set to `true` to crop output image to the image loaded from `LocalSourceImage` |
| 109 | + * @param {imageType} imageType "png" or "jpg" |
| 110 | + * @param {boolean} transparent |
| 111 | + * @param {boolean} includeImage Set to `true` to include the image loaded from `LocalSourceImage` |
| 112 | + * @param {boolean} includeText Set to `true` to include the text drawn from `Text`. |
| 113 | + * @param {boolean} cropToImageSize Set to `true` to crop output image to the image loaded from `LocalSourceImage` |
| 114 | + * @param {*} callback |
110 | 115 | */ |
111 | 116 | getBase64(imageType: ImageType, transparent: boolean, includeImage: boolean, includeText: boolean, cropToImageSize: boolean, callback: (error: any, result?: string) => void): void |
112 | 117 |
|
@@ -156,15 +161,15 @@ export interface RNSketchCanvasProps { |
156 | 161 | text?: CanvasText[] |
157 | 162 | /** |
158 | 163 | * { |
159 | | - * path: string, |
160 | | - * directory: string, |
| 164 | + * path: string, |
| 165 | + * directory: string, |
161 | 166 | * mode: 'AspectFill' | 'AspectFit' | 'ScaleToFill' |
162 | 167 | * } |
163 | 168 | */ |
164 | 169 | localSourceImage?: LocalSourceImage |
165 | 170 | } |
166 | 171 |
|
167 | | -export default class RNSketchCanvas extends React.Component<RNSketchCanvasProps & ViewProperties> { |
| 172 | +export default class RNSketchCanvas extends React.Component<RNSketchCanvasProps & ViewProps> { |
168 | 173 | clear(): void |
169 | 174 | undo(): number |
170 | 175 | addPath(data: Path): void |
|
0 commit comments