steveruizok / perfect-freehand

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

change color of lines #50

Closed MohsnRaj closed 2 years ago

MohsnRaj commented 2 years ago

All of my lines in my canvas change color when i change for one line. this is how i set color for line. in my uselayoutEffect i add this line : ` context.fillStyle = lineColor;

` linecolor is a state that i get of user .

steveruizok commented 2 years ago

Sorry, not related to perfect-freehand. Chances are you’re forgetting to call context.beginPath before each line.