steveruizok / perfect-freehand

Draw perfect pressure-sensitive freehand lines.
https://perfectfreehand.com
MIT License
4.52k stars 159 forks source link

[documentation] How to use Flattening? #70

Open hxse opened 1 year ago

hxse commented 1 year ago

https://codesandbox.io/s/perfect-freehand-example-forked-szhrx6?file=/src/App.js

const pathData2 = getSvgPathFromStroke(stroke);
const pathData = getFlatSvgPathFromStroke(stroke);

I want to draw smooth lines, without intersect points. But i get error Input geometry is not a valid Polygon or MultiPolygon