HTML5 canvas - opacity problem with a paint app
问题 I'm trying to program a paint application using Canvas. the way it works is by connection lines when the mouse is pressed. when the line is opaque it works well, but when I change the alpha parameter I get a problem. I tried two options: a. The path begins when the mouse is down for the first time and ends when the mouse is up again: every move of the mouse calls the stroke() function. because the line is transparent the beginning of the whole path will become opaque and the end won't,