Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


ITEXT

ITEXT

Note: Please see the TEXT function, which replaces the functionality of this routine.

Examples


In this example, we draw a polyline that points to a particular red blood cell, turn the line into an arrow by changing the polyline’s properties, and add a caption.

; Create an iTool with some image data        
file=FILEPATH('rbcells.jpg', $        
   SUBDIRECTORY=['examples', 'data'])        
IIMAGE, file, TITLE='Red Blood Cells', IDENTIFIER=imageID        
 
; A line pointing to a cell, in data space coordinates        
lineCoords=[[177, 141.5], [120, 41.5]]        
 
; Draw an arrow in the image's data space,        
; setting the line's color and thickness        
IPOLYLINE, lineCoords, /DATA, VISUALIZATION=imageID, $        
   THICK=3, COLOR=[240,0,0], ARROW_STYLE=2        
 
; Draw a label for the arrowtextCoords=[131, 26.5]        
ITEXT, 'Genome-modified Cell', textCoords[0], $        
   textCoords[1], /DATA, VISUALIZATION=imageID, $        
   ALIGNMENT=0.5, COLOR=[255,255,255]

Syntax


ITEXT, Text [, X, Y [, Z]] [, ALIGNMENT=Value] [, BASELINE=Value] [, /DATA | , /DEVICE | , /NORMAL] [, IDENTIFIER=Variable] [, ORIENTATION=Value] [, PROPERTY=Value] [, TARGET_IDENTIFIER=iToolID] [, TOOL=iToolID] [, UPDIR=Value] [, /VISUALIZATION]

Arguments


Text

The text to be displayed.

X, Y, Z

The location of the text to be displayed, specified in normalized coordinates unless the DATA or DEVICE keyword is set.

Keywords


Any property of a text annotation can be set using this routine. To set the value of a property, specify the property name as a keyword set equal to the appropriate property value. See ISETPROPERTY for details.

ALIGNMENT

Set this keyword to a floating-point value between 0.0 and 1.0 to indicate the horizontal alignment of the text baseline. An alignment of 0.0 (the default) left-justifies the text at the given position; an alignment of 1.0 right-justifies the text, and an alignment of 0.5 centers the text.

For example, if ALIGNMENT is set to 1.0, then the X, Y text location refers to the right edge of the text string.

BASELINE

Set this keyword to a two- or three-element floating-point vector describing the direction in which the baseline is to be oriented. Use this property in conjunction with the UPDIR keyword to specify the plane on which the text lies.

The following table gives the commonly-used BASELINE values:

Vector

Description

[1.0, 0, 0]

Parallel to +X axis (default)

[0, 1.0, 0]

Parallel to +Y axis

[0, 0, 1.0]

Parallel to +Z axis

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

IDENTIFIER

Set this keyword to a named variable that will contain the full identifier of the newly-created object.

NORMAL

Set this keyword if the input arguments are specified in normalized [0, 1] coordinates (the default).

ORIENTATION

Set this keyword to the orientation angle of the text in degrees. The orientation angle is defined as counter-clockwise from the positive x axis. The default value is 0.

TARGET_IDENTIFIER

Set this keyword to the iTools identifier of an object that is contained in the data space into which the text object should be placed. If a value is not supplied, the first data space in the current view is used.

TOOL

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

UPDIR

Set this keyword to a two- or three-element floating-point vector describing the vertical direction for the string. The upward direction is the direction defined by a vector pointing from the origin to the point specified.

Use this keyword in conjunction with the BASELINE keyword to specify the plane on which the text lies (the direction specified by UPDIR should be orthogonal to the direction specified by BASELINE).

For example, if you wanted a string to lie in the Y-Z plane, pointing downwards and towards you, you’d define BASELINE to be [0, 0, 1.0] (the +Z direction), and UPDIR to be [0, -1.0, 0] (the -Y direction).

VISUALIZATION

Set this keyword to add the object to the data space. The default behavior is to add the object to the annotation layer.

Version History


7.1

Introduced

See Also


ICONVERTCOORD, IPOLYGON, IPOLYLINE, IELLIPSE



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us