jayeszee / rn-draw

React native draw tool for react native applications
50 stars 36 forks source link

Simplify Path & Smoothing out pen strokes (curves) #14

Open gaboelnuevo opened 5 years ago

gaboelnuevo commented 5 years ago

Hello I had previously contributed to this repository. I decided to contribute a little more working on this.

I started using Simplify.js (borrowed some code of this lib) and added some performance optimizations for drawing paths.

And then try to smooth curves with D3.js

Achieving a pretty results. (Work in progress.)

Who wants to contribute to test this feature please comment here.

I will try to make a PR as soon as posible or share some advances.

softov commented 5 years ago

Hi, I'm searching for something like instagram, whatsapp or applike drawing.

It's like use take a picture and want to draw something inside, to check a place or some text handmaid.

I can help you to test it.

gaboelnuevo commented 5 years ago

As promised: Try with: yarn add git+https://github.com/gaboelnuevo/rn-draw.git#d3-curves

softov commented 5 years ago

Just waiting for test, and maybe I can help.

My intent is to take a picture and draw over it.

Until now I have done a little bit, based on RNDraw, ColorPicker and some imagination.

I have plans to create a git to my work, I just need to check a few things before.

Its a MediaPicker, where user can

When MediaPicker get a Image, user can draw and write a legend, on a Video, user only can write a legend.

I have plans to crop, resize and rotate Images, maybe even writing a text like Instagram does.

As you can see, user can select color or size of stroke, and undo last modification. The stroke size selector is a Slider from react-native-elements. The ColorPicker from react-native-color-picker. Maybe it can give you, or someone else, some ideas.

Image-1

softov commented 5 years ago

A repository for this example is here https://github.com/softov/rn-soft-drawer