rn-draw icon indicating copy to clipboard operation
rn-draw copied to clipboard

Simplify Path & Smoothing out pen strokes (curves)

Open gaboelnuevo opened this issue 5 years ago • 4 comments

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.

gaboelnuevo avatar Jun 08 '19 02:06 gaboelnuevo

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.

softov avatar Jun 09 '19 14:06 softov

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

gaboelnuevo avatar Jun 11 '19 03:06 gaboelnuevo

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

  • take a picture using (Camera.takePictureAsync)
  • make a video using (Camera.recordAsync)
  • or choose a picture/video from library using (ImagePicker. launchCameraAsync)

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 avatar Jun 13 '19 03:06 softov

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

softov avatar Jun 13 '19 09:06 softov