ImageEn, unit imageenproc |
|
TImageEnProc.UndoAt
Declaration
procedure UndoAt(Position: Integer; SaveToRedo: Boolean = False);
Description
Replaces the current image with the one at
Position in the Undo stack.
Parameter | Description |
Position | Undo index to restore: 0 = last saved undo, 1 = second to last saved undo, 2... up to UndoCount - 1 |
AutoRedo | Set to true for automatic redo support. Saves the current state (before undo) to the redo stack (i.e. calls SaveRedo) and removes this and prior entries from the Undo stack |
| Demos\ImageEditing\UndoRedo\UndoRedo.dpr |
// Undo the last item (same as calling ImageEnView1.Proc.Undo)
ImageEnView1.Proc.UndoAt( 0, True );
// Undo All
ImageEnView1.Proc.UndoAt( ImageEnView1.Proc.UndoCount, True );
Compatibility Information
In v6.2.1 and older versions,
AutoRedo would only assign the current state to the Redo List, and the undone item is not cleared. From v6.3.0,
AutoRedo clears all undone entries and assigns them to the redo list.
To return to the older functionality, enable the IEUseLegacyUndoFunctionality define in ie.inc
See Also
◼CanUndo◼UndoRect◼Undo