I am playing with the FingerPaint application that comes bundled with the API demos package. I was wondering if I could add an "Undo" feature to it, which would allow the user to remove/undo his latest stroke drawing from the canvas. I am not sure of how to achieve this though.
I was looking at the android.graphics.Canvas<http://developer.android.com/reference/android/graphics/Canvas.html>class and therein I found a few methods that caught my interest. canvas.restore() and canvas.save(). But I couldn't get them to work per my requirement. One of the approach could be memorizing all the Path(representing strokes drawn) and then resetting the canvas and reapinting all the stroked one by one except the latest. I somehow dont like this approach. How do I undo my drawings on canvas? Please help. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---