CImageView:Update


The Update method forces the CImageView window to update an image after it is changed.

Syntax

CImageView:Update()

CImageView:Update( nIndex )

bullet.gif    nIndex specifies the index of the image to update, in the range 1 to Count.

bullet.gif    if nIndex is omitted, then the top-most image is updated.

Remarks

The image window shows a view of the image data when the image was loaded. If changes are made to the image, then they will be updated only after Mira refreshes, or "updates" the view. Normally, Mira does this after any type of internal processing is done on a displayed image. Similarly, if a script changes the image data, then the view must be likewise refreshed to display the changes. However, some script methods and functions do not automatically refresh the view after making changes to the image. In such cases, you should call CImageView:Update to refresh the changed image or CImageView:UpdateAll to refresh all images of the window's image set.

Example

Assume that a CImageView exists as the objectV. The following script pastes a rectangular table into all images and then updates the currently displayed (top-most) image:

I = V:GetImage()

-- fetch the current displayed image

I:TableToRect(tbl,200,400)

-- paste a rectangular table of data at corner pixel (200,400)

V:Update()

-- force a window update to show the change

Related Topics

CImageView, UpdateAll, CImage class


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