EP-u-NW / painter

A simple flutter widget to paint with your fingers
https://pub.dev/packages/painter
Other
137 stars 66 forks source link

Feature: thickness size based on speed #19

Closed tapeo closed 3 years ago

tapeo commented 4 years ago

It would be cool have an option to enable the thickness of the pencil based on the speed of the cursor. I tried to draw something in native iOS and it seems to behave like that! What do you think?

tmarzeion commented 4 years ago

I was also thinking about that while making my notepad app, that is neat feature, but with current Painter implementation that would be really difficult.

Painter works by creating points and connecting them by lines with Path.lineTo method. Then when user stops dragging, path is painted by Canvas.drawPath. Canvas.drawPath takes Paint object as one of parameters, which means that thickness is final for each path and we cant modify it "on fly".

TL;DR: Implementation of that feature would require major painting mechanics modifications, quite difficult.

EP-u-NW commented 3 years ago

Since no one impelmented this by now, I'm closing it, since it hase been over a year.