In the following example, we magnify (zoom) an image in an iSurface tool by 50%.
file = FILEPATH('surface.dat', $
SUBDIRECTORY = ['examples', 'data'])
data = READ_BINARY(file, DATA_DIMS = [350, 450], DATA_TYPE = 2, $
ENDIAN = 'little')
ISURFACE, data, TITLE = 'Maroon Bells Elevation', $
COLOR = [255, 128, 0]
result = DIALOG_MESSAGE('Click OK to zoom the image.', $
IZOOM, Zoomfactor, [, CENTER=value] [, CURRENT=variable] [, /DATA | /DEVICE | /NORMAL] [, /RESET] [, TARGET_IDENTIFIER=iToolID] [, TOOL=iToolID]
A floating point value specifying the zoom factor used to magnify the window, where a value of 1.0 specifies 100%. IZOOM controls an iTool’s canvas zoom, and the zoom effect is cumulative. For example, calling IZOOM twice with a Zoomfactor of 2.0 will result in an overall magnification of 400%.
Set this keyword to a two-element vector [x,y] specifying the location about which to magnify the window. These coordinates should be given in normalized coordinates, unless the DATA or DEVICE keyword is specified.
Note: If the zoom operation results in scroll bars being added to the iTool window, the position of the centered point may shift slightly.
Set this keyword to a named variable that will contain the zoom factor after any zoom processing is completed.
Set this keyword if the center values are specified in data coordinates.
Set this keyword if the center values are specified in device coordinates (pixels).
Set this keyword if the center values are specified in normalized [0, 1] coordinates.
Set this keyword to reset the zoom factor to 100% before changing the magnification with a supplied Zoomfactor argument. Setting this keyword creates an absolute zoom factor, as opposed to the normal cumulative (or relative) zoom factor.
Set this keyword to the identifier of the object to use if the DATA keyword is set. For example, if an iTool has two axis objects, each object has a separate associated data space, and IDL needs to know which data space to associate with the center value.
Set this keyword to the iTools identifer of the iTool in which TARGET_IDENTIFIER is found. If not supplied, the current iTool is used.
ICONVERTCOORD, IGETID, IROTATE, ISCALE, ITRANSLATE