Examples
In the following example, we draw a circle over a JPG image, and then translate the circle to another location.
SUBDIRECTORY = ['examples', 'data'])
IIMAGE, file, /FIT_TO_VIEW
circle = [150, 120]
d = 15
circleTran = [167, 100]
text = [200, 60]
IELLIPSE, d, circle[0], circle[1], /DATA, $
IDENTIFIER = ellipseID, THICK=2, COLOR=[240,0,0], $
FILL_BACKGROUND=0
ITEXT, 'Proposed Landing Site', text[0], text[1], /DATA, $
/VISUALIZATION, ALIGNMENT = 0.5, IDENTIFIER = textID, $
COLOR=[255,255,255]
result = DIALOG_MESSAGE('Click OK to translate the circle.', $
/INFORMATION)
ITRANSLATE, ellipseID, circleTran[0], circleTran[1], /DATA
Syntax
ITRANSLATE, Id [, X[, Y[, Z]]] [, /DATA | /DEVICE | /NORMAL] [, /RESET] [, TOOL=iToolID] [, X=value] [, Y=value] [, Z=value]
Arguments
Id
The identifier of the object to translate. If you pass a partial identifier, the IGETID function is called to retrieve the full identifier string.
X, Y, Z
The distance to translate the specified visualization in the x, y, and z directions, specified in device coordinates unless the DATA or NORMAL keyword is specified.
Keywords
DATA
Set this keyword if the input arguments are specified in data coordinates.
DEVICE
Set this keyword if the input arguments are specified in device coordinates (pixels). This is the default behavior.
NORMAL
Set this keyword if the input arguments are specified in normalized [0, 1] coordinates.
RESET
Set this keyword to reset the current translation before applying any input translation values.
TOOL
Set this keyword to the identifer of the iTool in which Id is found. If not supplied, the current iTool is used.
X
Set this keyword to the distance to translate the visualization in the X direction. If this keyword is specified, the value supercedes the X argument.
Y
Set this keyword to the distance to translate the visualization in the Y direction. If this keyword is specified, the value supercedes the Y argument.
Z
Set this keyword to the distance to translate the visualization in the Z direction. If this keyword is specified, the value supercedes the Z argument.
Note: Z values are ignored if the DEVICE keyword is set.
Version History
See Also
IGETID, IROTATE, ISCALE, IZOOM