Hi guys,
I have made a simple program: i draw on a canvas with a pen. Pretty simple. The canvas back color is black, so if i want to erase what is drawn, i just have to turn the pen color to black and i'm done.
Now, i would like to use a more complex image with many differents colors as a new background. Let's say a sky with some clouds instead of a simple and uniform black back. So i created a new actor called BackGround and put in it my sky with some clouds. Then, i put on it my canvas. I draw some stuff on it (line, etc.). If i want to erase a part of a draw, i must handle transparency: If i draw a red line, i must be able to erase only a part of it and retrieve my original background showing sky and clouds.
I tried this:
erase(0,0,0,0);
putpixel(0,0);
but it erase all my canvas, not just some pixels. HOW can i do to erase just some pixels located unde the mouse and retrieve my original sky and clouds backgrounds instead ???
Thanks so very much for your answers.