CImageView:GetZoom
The GetZoom method returns the image magnification, or "zoom" factor in the CImageView window.
nZoom = CImageView:GetZoom() |
nZoom is an integer zoom number. See Remarks, below.
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 integer zoom numbers -16, -8, -4, -2, 1, 2, 4 , 8, and 16. The value ofnZoom must be one of these integer numbers.
Suppose a CImageI is displayed in a CImageView objectV. The following script retrieves the zoom factor and redisplays the image at twice the current zoom.
|
-- retrieve the current zoom factor |
|
-- bump zoom=-2 up to zoom=1 |
|
|
|
-- for example: turn -4 into -2 |
|
|
|
|
|
-- for example: turn 2 into 4 |
|
|
|
-- redisplay with 2x the previous zoom. |
CImageView, SetZoom, CImage class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.