Answer by joeycato for How do you draw with alpha = 0 in an html5 canvas to...
If you're working on something akin to a photoshop clone, then it's probably best for you to create a canvas for each layer. I think that would greatly simplify everything for you, while giving you...
View ArticleAnswer by Hans Vn for How do you draw with alpha = 0 in an html5 canvas to...
If you have to erase fluently, so when the mouse was clicked and moved this line should be erased, this might be a solution:var canvas = document.getElementById("myCanvas");var eraseWidth =...
View ArticleAnswer by Cerbrus for How do you draw with alpha = 0 in an html5 canvas to...
You'll want to use:ctx.fillStyle = "rgba(0,0,0,1)"; // (Drawing with 0 alpha pretty much means doing nothing)ctx.globalCompositeOperation = "destination-out";Working ExampleKeep in mind to save the...
View ArticleHow do you draw with alpha = 0 in an html5 canvas to 'erase'
How do you draw with alpha = 0 to an HTML5 Canvas? Imagine I'm making a photoshop clone, I have a layer that's solid red. I pick the eraser tool and draw with. It draws in rgba(0,0,0,0) letting me see...
View Article
More Pages to Explore .....