I am looking to create an Eraser for a drawing app in Canvas, and I have this code
canvas.clearRect(x, y, width, height);
How would i implement it?
I am looking to create an Eraser for a drawing app in Canvas, and I have this code
canvas.clearRect(x, y, width, height);
How would i implement it?
How do you really want the eraser? You could just paint with the background color instead of the foreground color.
You should probably let the user chose the foreground and background colors.