ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Getting "Undo" to work in BrushTest demo V6.3
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mvbobj

USA
14 Posts

Posted - May 21 2018 :  10:24:17  Show Profile  Reply
Hi,

I'm working on an application in a virtual machine where I'm still using version 6.3. Currently, there's a BrushTool demo which allows me to essentially redact portions of a document image and then "undo" the redactions in reverse order.

I'd like to get that to work in the BrushTest demo in 6.3 which does everything I want except for the Undo part. I was told I can add undo/redo to the v6.3 BrushTest demo, simply by manually calling Proc.SaveUndo before any change activity (e.g. mousedown).

I tried the SaveUndo and I also tried enabling AutoUndo and it's not undoing anything. I looked at the forum and did a search on undo and didn't find much to help with this.

I added the following code to the FormCreate event:

  ImageEnView1.Proc.UndoLimit := 20;
  ImageEnView1.Proc.AutoUndo := True;


I added an "Undo" button to the form with a click event containing the following code:

  ImageEnView1.Proc.Undo(False);
  ImageEnView1.Update;


It seems to me this should be working. What am I getting wrong here?

Thanks,
Robert

w2m

USA
1990 Posts

Posted - May 21 2018 :  11:56:40  Show Profile  Reply
Here is a demo that allows brush drawing with undo that uses a canvas for the drawing. Canvas drawing works better than the brush demo and is easier to use and understand:
attach/w2m/20153817538_GDIPlusImageMaker.zip
and Download: attach/w2m/201632912942_PaintBrush.zip

The demoes are described in the User demos pages:
https://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1446&whichpage=4

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: