rn-expo-draw
v0.0.5
Published
Drawing library for react-native using svg.
Downloads
12
Maintainers
Readme
rn-expo-draw is now deprecated! Use https://www.npmjs.com/package/rn-draw instead!
rn-expo-draw
React native draw tool for expo applications using svg based on @szimek's signaturepad https://github.com/szimek/signature_pad
Installation
Make sure you follow the proper guidelines on https://expo.io to set up your react native application with expo sdk.
Install with npm install -S rn-expo-draw
How to use
import RNDraw from 'rn-expo-draw'
<RNDraw
containerStyle={{backgroundColor: 'rgba(0,0,0,0.01)'}}
/>
Props
containerStyle [Object] - style for the container of the draw component.
rewind [func] - a function for passing the draw component's undo functionality. Example:
<RNDraw rewind={(undo) => {this._undo = undo} />
offset [object] - {x: Number, y: Number} - offset draw component relative to top left corner of the screen. (this accounts for the bug for android devices).
Work in progress
Pen color
Stroke width
Smoothing out pen strokes (curves)
Non-expo version