Home | About us | Overview | Softwares - Downloads | Evaluate | Order | Support | old forums | Contact | F.A.Q. | Documentations | Search | Sitemap

Undo or Redo modified on GdPicture Pro Imaging ?

Example requests & Code samples for GdPicture ActiveX.

Undo or Redo modified on GdPicture Pro Imaging ?

Postby manyounoi on Fri Jun 13, 2008 5:44 am

I've a question of GdPicture Pro Imaging, when I modified image but I want to undo or redo that modification , what should I do ?
manyounoi
 
Posts: 3
Joined: Fri Jun 06, 2008 9:41 am

Re: Undo or Redo modified on GdPicture Pro Imaging ?

Postby Loïc on Fri Jun 13, 2008 12:00 pm

Hi,

You need to use the CreateClonedImage() method to do that.

I give you a simple way to performs 1 level Undo / Redo operation:



Code: Select all
Dim nMainImage As Long
Dim nImageUndo1 As Long
Dim nImageUndo2 As Long

nMainImage = Imaging1.CreateImageFromFile("c:\dest.tif")
nImageUndo1 = Imaging1.CreateClonedImage(nMainImage)
Imaging1.SetNativeImage (nImageUndo)
Call Imaging1.DrawText("DummyText", 50, 50, 10)

'Here we want to performs Undo operation

Imaging1.SetNativeImage (nMainImage)
nImageUndo2 = Imaging1.CreateClonedImage(nMainImage)
Imaging1.SetNativeImage (nImageUndo2)

Call Imaging1.DrawText("DummyText2", 50, 50, 10)

'Here we want to performs Redo operation
Imaging1.SetNativeImage (nImageUndo1)
Imaging1.CloseImage (nImageUndo2)


Best regards,

Loïc
User avatar
Loïc
Site Admin
 
Posts: 1195
Joined: Tue Oct 17, 2006 11:48 pm
Location: France

Re: Undo or Redo modified on GdPicture Pro Imaging ?

Postby manyounoi on Wed Jun 18, 2008 12:33 pm

Thank you :D :D :D
manyounoi
 
Posts: 3
Joined: Fri Jun 06, 2008 9:41 am


Return to Example requests & Code samples

Who is online

Users browsing this forum: No registered users and 0 guests