@magnetman103/react-native-sketch-canvas
Version:
A fork of react native sketch canvas from sourcetoad for modification.
29 lines • 1.32 kB
TypeScript
import React from 'react';
import { type Path, type StrokeEndData } from './DrawCanvas';
interface SketchContainerProps {
strokeColor: string;
strokeWidth: number;
style?: any;
user?: string;
onStrokeStart?: (x: number, y: number) => void;
onStrokeChanged?: (x: number, y: number) => void;
onStrokeEnd?: (data: StrokeEndData) => void;
onPathsChange?: (pathsUpdate: any) => void;
onSketchSaved?: (success: boolean, path: string) => void;
onGenerateBase64?: (result: any) => void;
onCanvasReady?: () => void;
touchEnabled?: boolean;
scrollY?: (y?: number, velocity?: number) => void;
eraserOn?: boolean;
}
export interface SketchContainerRef {
clear: () => void;
undo: () => number;
addPath: (data: Path) => void;
getPaths: () => Path[];
save: (imageType: string, transparent: boolean, folder: string, filename: string, includeImage: boolean, includeText: boolean, cropToImageSize: boolean) => void;
getBase64: (imageType: string, transparent: boolean, includeImage: boolean, includeText: boolean, cropToImageSize: boolean) => void;
}
declare const SketchContainer: React.ForwardRefExoticComponent<SketchContainerProps & React.RefAttributes<SketchContainerRef>>;
export default SketchContainer;
//# sourceMappingURL=SketchContainer.d.ts.map