views:

73

answers:

1

hello
I'm trying to make a paint tool in wxpython. and i couldn't find a way to make an ( Eraser ) . how can i make an eraser tool - just like the one in windows paint - in wxpython ? please help .
the idea or small code sample would be very helpful


thanks in advance

+3  A: 

Have you made a Pen tool? Just set its colour to the canvas' background colour ;)

by the way I actively develop my own wxpython painting program that you may want to check out; see http://code.google.com/p/whyteboard/

Steven Sproat
+1 AWESOME WORK ! .. what im trying to do the nearly the same as the software you have . except for its only to draw comments given by directors . ( it's specific for 2D animation). and i have to admit, i got really disappointed from my self after seeing your work !. thanks
Moayyad Yaghi
but what if i have the background as an image . i dont want to erase any part of that image. i just want to erase lines above it. any ideas?
Moayyad Yaghi
How have you programmed the pen/eraser? Like in the "Doodle" wxPython demo (a list of (x, y) points)? I'm struggling to think how to not erase the image, sorry :(
Steven Sproat