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
 Undo for multipage file

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
graph_man Posted - Jun 13 2022 : 05:07:05
In ImageEnMView, the user selects the desired pages and presses the rotate button (for example).
For each page, I load the content into an ImageEnView and do the rotation.
Is it possible to undo this action for all these pages when the UNDO button is clicked?
6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 16 2022 : 01:07:44
That's your own method specifying where the images should be saved to (with trailing backslash).

Nigel
Xequte Software
www.imageen.com
graph_man Posted - Jun 15 2022 : 04:22:08
Thank you.
But what is GetBackupFolder() ?
I cannot find this function.
xequte Posted - Jun 14 2022 : 16:21:26
How about something like this?

procedure TForm1.RotateFrame(Index: Integer; Angle: double);
var
  fn: string;
begin
  fn := GetBackupFolder() + ImageEnMView1.MIO.Params[Index].Filename + '_' + IntToStr( Index ) + '.png';
  ImageEnMView1.GetImageToFile( Index, fn );
  ImageEnMView1.IEMBitmap.Rotate( Index, Angle, ierBicubic );
end;

function TForm1.CanUndo(Index: Integer): Boolean;
var
  fn: string;
begin
  fn := GetBackupFolder() + ImageEnMView1.MIO.Params[Index].Filename + '_' + IntToStr( Index ) + '.png';
  Result := FileExists( fn );
end;

procedure TForm1.UndoFrame(Index: Integer);
var
  fn: string;
begin
  fn := GetBackupFolder() + ImageEnMView1.MIO.Params[Index].Filename + '_' + IntToStr( Index ) + '.png';
  ImageEnMView1.SetImageFromFile( Index, fn );
  DeleteFile( fn );
end;


Nigel
Xequte Software
www.imageen.com
graph_man Posted - Jun 14 2022 : 01:25:25
Is it possible to record additional information in the undo, for example, the page number for which this action was performed?
graph_man Posted - Jun 14 2022 : 01:23:12
Please write in more detail how to do it.
xequte Posted - Jun 13 2022 : 20:10:01
I'm afraid there is no undo functionality for TImageEnMView. You would need to save a backup of the TImageEnView frame that can be restored if the user clicks undo.



Nigel
Xequte Software
www.imageen.com