I am making a image editor kinda for own enjoyment and was wondering how could I make a undo button to undo the last paints I did? I want to know how I would about this, a tutorial or sample code would be nice or at least something pointing me in the right direction.
Thanks!
heh undo in really non that hard as it sounds. The magic here that you should record each action as object which is painted in a list or queue, f.ex, user draws a line, so your record could look like x,y of start poing, and x,y of end point or object it self which have method Draw(), so what undo will do just remove that object.
in code that could look something like this: