In html5, when you draw to a canvas using putImageData(), if some of the pixels you are drawing are transparent (or semi-transparent), how do you keep old pixels in the canv
You can use getImageData to create a semi-transparent overlay:
Here's example code and a Demo: http://jsfiddle.net/m1erickson/CM7uY/
Alternatively, you might check out using a linear gradient to do your effect more directly.
http://jsfiddle.net/m1erickson/j6wLR/