IDLgrText

A text object represents one or more text strings that share common rendering attributes.

An IDLgrText object is an atomic graphic object ; it is one of the basic drawable elements of the IDL Object Graphics system, and it is not a container for other objects.

Superclasses

This class has no superclasses.

Subclasses

This class has no subclasses.

Creation

See IDLgrText::Init

Methods

Intrinsic Methods

This class has the following methods:


IDLgrText::Cleanup

The IDLgrText:: Cleanup procedure method performs all cleanup on the object. IDLgrText is described above.

Calling Sequence

OBJ_DESTROY, Obj

or

Obj -> [IDLgrText::] Cleanup                               ( In a subclass' Cleanup method only .)

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrText::GetCTM

The IDLgrText:: GetCTM function method returns the 4 x 4 graphics transform matrix from the current object upward through the graphics tree. IDLgrText is described above.

Calling Sequence

Result = Obj -> [IDLgrText::] GetCTM()

Arguments

There are no arguments for this method.

Keywords

DESTINATION

Set this keyword to the object reference of a destination object to specify that the projection matrix for the View object in the current tree be included in the returned transformation matrix. The resulting matrix will transform a point in the data space of the object on which the GetCTM method is called into a normalized coordinate system (-1 to +1 in X, Y, and Z), relative to the View object that contains the text object.

TOP

Set this keyword equal to the object reference to an IDLgrModel object to specify that the returned matrix accumulate from the object on which the GetCTM method is called up to and including the specified model object.


IDLgrText::GetProperty

The IDLgrText:: GetProperty procedure method retrieves the value of a property or group of properties for the text. IDLgrText is described above.

Calling Sequence

Obj -> [IDLgrText::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrText::Init

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.

PARENT

Set this keyword equal to a named variable that will contain an object reference to the object that contains this object.

XRANGE

Set this keyword equal to a named variable that will contain a two-element vector of the form [ xmin , xmax ] that specifies the range of x data coordinates covered by the graphic object.

U YRANGE

Set this keyword equal to a named variable that will contain a two-element vector of the form [ ymin , ymax ] that specifies the range of y data coordinates covered by the graphic object.

ZRANGE

Set this keyword equal to a named variable that will contain a two-element vector of the form [ zmin , zmax ] that specifies the range of z data coordinates covered by the graphic object.


IDLgrText::Init

The IDLgrText:: Init function method initializes the text object. IDLgrText is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrText' [, String] )

or

Result = Obj -> [IDLgrText::] Init( [, String] )
( In a subclass' Init method only .)

Arguments

String

The string (or vector of strings) to be created. If this argument is not a string, it is converted prior to using the default formatting rules.

Keywords

Properties retrievable via IDLgrText::GetProperty

ALIGNMENT (Get, Set)

Set this keyword to a floating point value between 0.0 and 1.0 to indicate the requested horizontal alignment of the text baseline. An alignment of 0.0 (the default) aligns the 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 over the given position.

BASELINE (Get, Set)

Set this keyword to a two (or three) element vector describing the direction in which the baseline is to be oriented. Use this keyword in conjunction with the UPDIR keyword to specify the plane on which the text lies. The default BASELINE is [1.0,0,0] (i.e., parallel to the x-axis).

CHAR_DIMENSIONS (Get, Set)

Set this keyword equal to a two-element vector [ width , height ] indicating the dimensions (measured in data units) of a bounding box for each character, to be used when scaling text projected in three dimensions. If either width or height is zero, the text will be scaled such that if it were positioned halfway between the near and far clipping planes, it will appear at the point size associated with this text object's font. The default value is [0, 0].

For example, if the VIEWPLANE_RECT of the view the text object is being rendered in is set equal to [0,0,10,10] (that is, it spans ten data units in each of the X and Y directions), setting the CHAR_DIMENSIONS property equal to [2, 3] will scale the text such that each character fills 20% of the X range and 30% of the Y range.

This property has no effect if the ONGLASS property is set equal to one.

COLOR (Get, Set)

Set this keyword to the color to be used as the foreground color for the text. The color may be specified as a color lookup table index or as an RGB vector. The default is [255, 255, 255].

ENABLE_FORMATTING (Get, Set)

Set this keyword to indicate that the text object should honor embedded Hershey-style formatting codes within the strings. (Formatting codes are described in the "Fonts" chapter of the IDL Reference Guide .) The default is not to honor the formatting codes.

FONT (Get, Set)

Set this keyword to an instance of an IDLgrFont object class to describe the font to use to draw this string. The default is 12 point Helvetica. See IDLgrFont for details.

HIDE (Get, Set)

Set this keyword to a boolean value indicating whether this object should be drawn:

LOCATIONS (Get, Set)

Set this keyword to an array of one or more two- or three-element vectors specifying the coordinates (measured in data units) used to position the string(s). Each vector is of the form [ x , y ] or [ x , y , z ]; if z is not provided, it is assumed to be zero. Each location corresponds to the corresponding string in the String argument. If only one location is provided, and the String argument is a vector of more than one strings, the initial string is positioned at the given location, and each subsequent string is positioned by cyclically reusing the location values.

NAME (Get, Set)

Set this keyword equal to a string containing the name associated with this object. The default is the null string, ' '.

ONGLASS (Get, Set)

Set this keyword to indicate that the text should be displayed "on the glass". The default is projected 3D text.

RECOMPUTE_DIMENSIONS (Get, Set)

Set this keyword to one of the following values to indicate when this text object's character dimensions (refer to the CHAR_DIMENSIONS property) are to be recomputed automatically:

STRINGS (Get, Set)

Set this keyword to the string (or vector of strings) associated with the text object. This keyword is the same as the String argument described above.

UPDIR (Get, Set)

Set this keyword to a two (or three) element 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. The default UPDIR is [0.0, 1.0, 0.0] (i.e., parallel to the Y axis).

UVALUE (Get, Set)

Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.

VERTICAL_ALIGNMENT (Get, Set)

Set this keyword to a floating point value between 0.0 and 1.0 to indicate the requested vertical alignment of the text. An alignment of 0.0 (the default) bottom-justifies the text at the given location; an alignment of 1.0 top-justifies the text at the given location.

XCOORD_CONV (Get, Set)

Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert X coordinates from data units to normalized units. The formula for the conversion is as follows:

Normalized X = s 0 + s 1 * Data X

Recommended values are:

[(- X min )/( X max - X min ), 1/( X max - X min )]

The default is [0.0, 1.0].

YCOORD_CONV (Get, Set)

Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Y coordinates from data units to normalized units. The formula for the conversion is as follows:

Normalized Y = s 0 + s 1 * Data Y

Recommended values are:

[(- Y min )/( Y max - Y min ), 1/( Y max - Y min )]

The default is [0.0, 1.0].

 

ZCOORD_CONV (Get, Set)

Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Z coordinates from data units to normalized units. The formula for the conversion is as follows:

Normalized Z = s 0 + s 1 * Data Z

Recommended values are:

[(- Z min )/( Z max - Z min ), 1/( Z max - Z min )]

The default is [0.0, 1.0].


IDLgrText::SetProperty

The IDLgrText:: SetProperty procedure method sets the value of a property or group of properties for the text. IDLgrText is described above.

Calling Sequence

Obj -> [IDLgrText::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrText::Init