IDLgrWindow::GetTextDimensions
The IDLgrWindow::GetTextDimensions function method retrieves the dimensions of a text or axis object that will be rendered in a window. In order to compute the effective text dimensions, the object must be inserted into an object graphics hierarchy prior to using this method. The result is a 3-element double-precision floating-point vector [xDim, yDim, zDim] representing the dimensions of the text or axis object, measured in data units. If the object specified is an axis object, the result encompasses the tick labels and the title of the axis (if any).
Note: The returned results take into account the setting of the IDLgrText RECOMPUTE_DIMENSIONS property.
Syntax
Result = Obj->[IDLgrWindow::]GetTextDimensions( TextObj [, DESCENT=variable] [, PATH=objref(s)] )
Return Value
Returns a 3-element double-precision floating-point vector [xDim, yDim, zDim] representing the dimensions of the text or axis object, measured in data units.
Arguments
TextObj
The object reference to a text or axis object for which the text dimensions are requested.
Keywords
DESCENT
Set this keyword equal to a named variable that will contain an array of double-precision floating-point values (one for each string in the IDLgrText object). The values are the distance to travel (parallel to the UPDIR direction) from the baseline to reach the bottom of all the descenders for the string; the values will be negative or 0. This keyword is only valid if TextObj is of the class IDLgrText.
PATH
Set this keyword to a single object reference or a vector of object references. This keyword specifies the path in the graphics hierarchy to compute the text dimensions. Each path object reference specified with this keyword must contain an alias. The text dimensions are computed for the version of the object falling within that path. If this keyword is not set, the PARENT properties determine the path from the current object to the top of the graphics hierarchy and no alias paths are pursued. If IDLgrWindow::GetTextDimensions is called from within a Draw method and the PATH keyword is not set, the alias path used to find the object during the draw is used, rather than the PARENT path.
Note: For more information on aliases, refer to the ALIAS keyword in IDLgrModel::Add.
Version History
5.0 |
Introduced |