title: HTML5 canvas - opacity problem with a paint app
body: <p>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.</p>
  
  <p>I tried two options:</p>
  
  <p>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, because stroke() is called many times, and it drwas the whole path again and again.</p>
  
  <p>b. The path begins and ends every move of the mouse:
  the line is transparent through the whole way, but the matching point between every path and path are less transparent (because they're made of two lines).  so the whole path is not solid.</p>
  
  <p>the only way I get a good result is when I call stroke() only when the mouse is up again. then it strokes the whole path well, but I see nothing while actually drawing it.</p>
  
  <p>what can I do?</p>
  
  <p>thanks</p>