T O P I C R E V I E W |
pierrotsc |
Posted - Jul 22 2015 : 07:43:56 Is there a way to undo a stream of commands like the ones below? ImageEnVect.Proc.SaveUndo; { Merge vectorial objects with the background image } ImageEnVect.CopyObjectsToBack(Antialias.Checked, AdaptBitmapPixelFormat.Checked);
ImageEnVect.RemoveAllObjects; ImageEnVect.Update;
Thanks. Pierre |
16 L A T E S T R E P L I E S (Newest First) |
pierrotsc |
Posted - Jul 22 2015 : 15:38:22 Ok...When i click undo, it clears everything in the new demo. The old works ..Let me play with it.. |
w2m |
Posted - Jul 22 2015 : 15:27:40 5.0.2 version is old.... try at least 6.0.1. that is what I am using. There have been a lot of changes between 5 and 6...
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
pierrotsc |
Posted - Jul 22 2015 : 15:25:14 Bill, give me a few mn to look at your new demo. Something just came up :) I'll get back to you..
I am using 5.0.2 Pierre |
w2m |
Posted - Jul 22 2015 : 15:19:33 No you are correct... it should be ieumShared ... you got me confused.
procedure TForm1.FormCreate(Sender: TObject);
begin
ImageEnVect1.ObjUndoMode := ieumShared;
ImageEnVect1.ObjAutoUndo := False;
ImageEnVect1.ObjUndoLimit := 10;
IERegisterFormats;
OpenPictureDialog1.Filter := GraphicFilter(TGraphic);
end; The simpler demo uses ieumShared!
If the simple demo sent by email does not work as is then you should update ImageEn. What version are you using anyway?
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
pierrotsc |
Posted - Jul 22 2015 : 15:12:40 Got it. I guess i got confused. I thought i had to use ieumShared to use proc.undo for both vector and bitmap.
Let me look at your demo. Thanks. |
w2m |
Posted - Jul 22 2015 : 15:09:47 You should be using ieumSeparated in order to use ImageEnVect1.Proc.Undo. See the simplified version I emailed you.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
pierrotsc |
Posted - Jul 22 2015 : 15:05:54 Got it..When in your demo I changed in the imageenvect component the objundomode property to shared instead of separated, it then left the bitmap after the undo. |
pierrotsc |
Posted - Jul 22 2015 : 14:41:34 Yep, your demo works fine. There is something i am modifying that makes the bitmap stay. I'll troubleshoot. Thanks. |
pierrotsc |
Posted - Jul 22 2015 : 14:36:02 When i tried your demo originally, it worked fine. No problem. I made some modifications and it behaves like mine. Let me reload your original source code again..And try it..
Thanks. |
w2m |
Posted - Jul 22 2015 : 14:26:47 Pierre,
You are using an older version of ImageEn than I am using. When I compile your project here it works as expected.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
w2m |
Posted - Jul 22 2015 : 14:20:38 the email is just below my name in the post.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
pierrotsc |
Posted - Jul 22 2015 : 14:18:35 Bill, i am emailing you a modified project. Create a box, merge it and undo. Move the box and you will see the box bitmap still there. If you do not get it in a few, i may have an old email address. |
pierrotsc |
Posted - Jul 22 2015 : 14:04:26 Thanks Bill. Your demo works fine but not my code :( When i undo, the box comes back but when i move it, the raster image of the box is still there. Not in your demo though..
Will try to find out what is wrong. Pierre |
w2m |
Posted - Jul 22 2015 : 12:57:15 Yes. One click on undo, undo's both. You may get the demo here: http://www.xecute.com/ieforum/topic.asp?whichpage=2.95&TOPIC_ID=1446#8175
If you have an old version of ImageEn this featurte may not be present, in which case you must use both ObjUndo and Proc.Undo functions. See the help file. It is highly recommended that ImageEn is kept up-to-date.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
pierrotsc |
Posted - Jul 22 2015 : 12:34:23 Thanks Bill. I was not aware of the mode. Now, would the undo command undo 2 commands one after another in one time? I am doing a copyobjectstoback and a removeall objects.
Where can I find the user's area for the demo? Thanks. |
w2m |
Posted - Jul 22 2015 : 12:11:31 TImageEnVect.ObjUndoMode
Declaration
property ObjUndoMode: TIEVUndoMode;
Description
This property allows you to share the Undo/Redo system between image processing and vectorial objects. The default value (ieumSeparated) separates the two systems.
Example
ImageEnVect1.ObjUndoMode := ieumShared; ImageEnVect1.ObjAutoUndo := true; ImageEnVect1.Proc.UndoLimit := 10;
From now you can do Undo of image processing or vectorial objects just calling:
ImageEnVect1.Proc.Undo; ImageEnVect1.Proc.ClearUndo;
otherwise if ObjUndoMode is ObjUnmSeparated then both ObjSaveUndo, Proc.SaveUndo and ObjUndo, Proc.Undo and ObjClearUndo, Proc.ClearUndo must be used.
Set ObjUndoMode := ieumShared then Proc.Undo, changes both the processing changes and any object changes.
A small demo will be posted to the users section.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |