Open kaelumania opened 9 years ago
curve fitting for what?
For drawing a shape (e.g. line) by hand and afterwards approximating the curve/line with bezier curves/segments. In order to finally flatten and simplifying this approximation to have a low memory footprint.
It's a good feature to add at some point in the future. Should be fairly straightforward to plug in at the moment when we create fabric.Path's on mouse up in free drawing mode.
Sent from my iPhone
On 03 Aug 2015, at 07:45, Stephan E. notifications@github.com wrote:
For drawing a shape (e.g. line) by hand and afterwards approximating the curve/line with bezier curves/segments. In order to finally flatten and simplifying this approximation to have a low memory footprint.
— Reply to this email directly or view it on GitHub.
could you give some further details, hints and examples how to implement this feature?
Take a look at where "path:created" event is fired in the repo to see what's going on there.
Sent from my iPhone
On 03 Aug 2015, at 08:50, Stephan E. notifications@github.com wrote:
could you give some further details, hints and examples how to implement this feature?
— Reply to this email directly or view it on GitHub.
Need example for this. Currently i am using paperjs to import svg and edit its path using bezier curve, then importing output to fabricjs. All the work done in fabric only but i have to use paperjs for editing paths
cleanup:
does decimatePoints
cover this?
a bit. Not entirely. A curve fitting would create a smart beizer from many segments, we just reduce the segments
Are there any plan or current features that can be used to implement curve fitting?