CImageView:Undo

CImageView:UndoAll


The UndoAll method restores all images of the CImageSet displayed in the current CImageView window by replacing each with its undo copy.

Syntax

bResult = CImageView:UndoAll()

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This method restores all images in the CImageView window to their saved state. All images must have been saved either by calling the SaveUndoAll method or by calling SaveUndo for one or more of the images.

Example

The following script attaches an image window from the Mira desktop and saves an undo copy for all of its images. The images are changed by adding 30.5 to each pixel, then restored using UndoAll:

V = attachlist_imageview()

-- attach an image window from a list of windows on the desktop

V:SaveUndoAll()

-- save all images in their current state

for n = 1, V:Count() do

-- for each image in the window

  I = V:GetImage(n)

-- get the next image

  I:Add(30.5

-- add 30.5 to each pixel value

end

 

V:UndoAll()

-- restore all images to their state before adding 30.5.

Related Topics

CImageView

Undo

SaveUndo

SaveUndoAll

Display

CImage class

 


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.