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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Getting "Undo" to work in BrushTest demo V6.3

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
mvbobj Posted - May 21 2018 : 10:24:17
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

1   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - May 21 2018 : 11:56:40
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