My entire goal of this project is to make an "eraser" of sorts, where you can select that you want to erase, and then click where you want to erase, erase (turn pixels "underneath" white), and then click when you want to be done erasing. I stumbled across Brett Shoelson's freehanddraw mfile on the file exchange which draws a line when you click and stops drawing when you click again and gives you the points that you drew over. (The code is below)
What I have so far:
-A gui that allows you to load an image
-A button that calls the freehanddraw script
-A slider to determine the eraser size
-Some code that given the points you drew over will make all the pixels in the eraser size white.
What I want/Am missing:
-The ability to preview what I am going to erase, instead of making a 1 pixel thick line of where I have gone, I want to it to highlight with the thickness of the eraser as given by the slider. Selecting the pixels isn't my trouble, its getting the image to update mid draw so I know what's going to be erased and what is not.
*Specifically: *
I am looking for a way to update the image quickly mid-draw and have it refreshed throughout.
Where I think would be helpful to look but I am confused:
In the wbmfcn function (second to the bottom) this is the button move function
Thanks for any help!