|
CImageView:Undo
The Undo method restores a member of the
CImageSet displayed in the current
CImageView window by replacing it with its undo copy.
The target image may be the current displayed image or the
CImageSet member at a specific index.
Syntax
|
bResult = CImageView:Undo()
bResult = CImageView:Undo( nIndex )
|
nIndex is the index of the target image in the
CImageSet, in the range range 1 to
Count. If not specified, then the current image is
used.
On success,
this method returns
true.
On failure,
this method returns
false.
Remarks
This method restores the target image in the
CImageView window to its saved state. The target image must
have beed saved either by calling the
SaveUndoAll method or by calling
SaveUndo for one or more of the images.
Example
Assume that a CImageView exists and is
assigned toV. The following
script saves an undo copy, changes the image, then restores it:
|
V = new_imageview()
|
|
|
I = new_image()
|
|
|
local sPath, bOk =
GetFileName()
|
|
|
I:Open(sPath)
|
|
|
V:Display(I)
|
|
|
bOk = V:SaveUndo()
|
|
|
I:Add(30.5)
|
|
|
V:Undo()
|
|
Related Topics
CImageView
SaveUndo
SaveUndoAll
UndoAll
Display
CImage class
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|