CImageView:SetPlotAvgMode CImageView:Update

CImageView:SetZoom


The SetZoom method changes the image magnification, or "zoom" factor in the CImageView window.

Syntax

CImageView:SetZoom( nZoom )

bullet.gif    nZoom is a zoom number described in Remarks, below.

Remarks

Mira displays images with the following zoom factors: 1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, and 16. This is encoded as the zoom numbers -16, -8, -4, -2, 1, 2, 4, 8, and 16. The value ofnZoom must be one of these integer zoom numbers.

Example

The following script loads and displays an image and then sets the magnification factor (the zoom) to 1/2 normal by specifying a zoom factor of -2 (see Remarks):

I = new_image()

-- create a CImage

I:Open(sPath)

-- load the from a file named sPath

V = I:Display()

-- display the image and return the CImageView V

V:SetZoom(-2)

-- set the zoom factor to -2 (magnification = 1/2)

Related Topics

CImageView, GetZoom, CImage class


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