Routines (alphabetical) > Routines: I > IZOOM

# IZOOM

## Examples

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]

; Insert a dialog box to pause the flow of action

result = DIALOG_MESSAGE('Click OK to zoom the image.', $

/INFORMATION); Magnify (zoom) the image 150%

IZOOM, 1.5

## Syntax

IZOOM, Zoomfactor, [, CENTER=value] [, CURRENT=variable] [, /DATA | /DEVICE | /NORMAL] [, /RESET] [, TARGET_IDENTIFIER=iToolID] [, TOOL=iToolID]

## Arguments

### Zoomfactor

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%.

## Keywords

### CENTER

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.

### CURRENT

Set this keyword to a named variable that will contain the zoom factor after any zoom processing is completed.

### DATA

Set this keyword if the center values are specified in data coordinates.

### DEVICE

Set this keyword if the center values are specified in device coordinates (pixels).

### NORMAL

Set this keyword if the center values are specified in normalized [0, 1] coordinates.

### RESET

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.

### TARGET_IDENTIFIER

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.

### TOOL

Set this keyword to the iTools identifer of the iTool in which TARGET_IDENTIFIER is found. If not supplied, the current iTool is used.

##
Version History

7.1 | Introduced

## See Also

ICONVERTCOORD, IGETID, IROTATE, ISCALE, ITRANSLATE