jakubfiala / atrament

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

Adaptive stroke causes flood fill artifacts #94

Closed jakubfiala closed 8 months ago

jakubfiala commented 8 months ago

AS seems to be the cause of these. The fill works perfectly if only smoothing is enabled.

jakubfiala commented 8 months ago

turns out this is happening because of antialiasing, which creates semi-transparent pixels around the stroke. I've addressed this to an extent in b1986fd but there are still cases where the issue persists (e.g. draw a closed stroke, fill it with a different colour, then fill that same area with another colour).

jakubfiala commented 8 months ago

from my testing I deem the current state good enough