jakubfiala / atrament

A small JS library for beautiful drawing and handwriting on the HTML Canvas.
http://fiala.space/atrament/demo
MIT License
1.57k stars 115 forks source link

added the 'closedPaths' option #63

Closed Bunkerbewohner closed 3 years ago

Bunkerbewohner commented 3 years ago

Hi! Thanks for creating this great lib! I'm using it in a little toy project but I didn't want the paths to always be closed automatically when drawing. At first I hacked the behaviour by doing this:

canvas.getContext("2d").closePath = () => {}; // make closePath a no-op

But I thought an actual option would be cleaner. So this is my proposal for adding such an option.

Cheers

Bunkerbewohner commented 3 years ago

I take it back! Turns out I don't need this option, and I assume other users usually don't either.

jakubfiala commented 3 years ago

Hi there @Bunkerbewohner - thanks for opening the PR, I really appreciate it! I do agree this option probably isn't incredibly useful, but I'll keep an eye out on other users mentioning it :)