update: looks like there is sample code with a nice snapshot eraser tool bundled right in with Corona…the trick is to make your painting layer in a snapshot and the picture that you’re painting on a regular background as it’s not manipulated.
I’m working on my Roomalyzr app and realize that I need to have an “erase” function that allows a user to delete the work they did earlier.
I basically followed this tutorial to create a painting simulation:
http://coronalabs.com/blog/2013/11/01/snapshot-canvas-paint-brushes-trailing-object-effects-etc/
I create a snapshot here:
mySnap = display.newSnapshot( display.contentWidth-20, display.contentHeight-110 )
post a photo into that snapshot, then I am inserting my brush into a snapshot’s canvas like this:
mySnap.canvas:insert( brush )
mySnap:invalidate( “canvas” )
but I can’t seem to figure out how to remove the brush via an eraser tool that is able to hitTest the brush. Anyone have ideas on how to get rid of elements inserted into snapshot?
Thanks,
Jen