CALL GSTRLEN
(length, text <, height> <, font> <, window> ) ;
The GSTRLEN subroutine returns the lengths of text strings represented in a given font and for a given character height. The lengths are given in world coordinates. The required arguments to the GSTRLEN subroutine are as follows:
is a matrix of lengths specified in world coordinates.
is a matrix of text strings.
The optional arguments to the GSTRLEN subroutine are as follows:
is a numeric matrix or literal that specifies the character height.
is a character matrix or quoted literal that specifies a valid font name.
is a numeric matrix or literal that specifies a window. This is given in world coordinates and has the form
{minimum-x minimum-y maximum-x maximum-y} |
The length argument is the returned matrix. It has the same shape as the matrix text. Thus, if text is an matrix of text strings, then length is an matrix of lengths in world coordinates. If you do not specify font, the default font is assumed. If you do not specify height, the default height is assumed. An example that uses the GSTRLEN subroutine follows:
call gstart; /* centers text at coordinates */ ht = 2; x = 30; y = 90; str = "Nonparametric Cluster Analysis"; call gstrlen(len, str, ht, "simplex"); call gscript(x-(len/2), y, str, , , ht, "simplex"); call gshow;