|
Contents | Previous | Next | Subchapters |
textsize(text)
TextSize(text)
textsize is an intrinsic function and
requires text to be a character row vector.
The routine TextSize is defined in the include file
guisize.oms
and allows text to be an arbitrary character matrix.
The Return value is a two column integer matrix in which the first
column is the width of the corresponding row of text
and the second column is the height of
the corresponding row of text.
text = "line 1"
textsize(text)
O-Matrix will respond with a two element row vector
in which the first element is the width and the second element is
the height of "line 1" in pixels.
If the file guisize.oms has not yet been included,
enter the command
include guisize.oms
If you enter
text = {"line 1", "line two"}
TextSize(text)
O-Matrix will respond with a 2 by 2 matrix in which
the first row contains the size of "line 1" in pixels
and the second matrix contains the size of "line two" in pixels.
[0, 0].