Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
private void menuItemUndo_Click(object sender, EventArgs e)
       {
           imageHandler.ResetBitmap();
           this.AutoScrollMinSize = new Size(Convert.ToInt32(imageHandler.CurrentBitmap.Width * zoomFactor), Convert.ToInt32(imageHandler.CurrentBitmap.Height * zoomFactor));
           this.Invalidate();
       }


The above code is used to do the undo operation only once in an image(c#).I need to work this function until all changes removed from the image.
Posted
Comments
Sridhar Patnayak 19-Jun-13 1:43am    
So what you want?

please visit this link

[^]
 
Share this answer
 
Comments
Prasad_Kulkarni 19-Jun-13 3:09am    
Good link! +5!
samadhan_kshirsagar 19-Jun-13 3:14am    
Apki waj se hi yaha hu mai............gtalk pe aao na....
you need to create a list of actions. Ideally you don't keep a single altered image in memory, you keep the starting image, and each time apply the actions in question. Then you just apply all your actions except the one you want to undo, to the original image, to get the undone one. The only alternative is to keep x images in memory where x is the number of undo steps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900