Original Author Paul Laughton, 2011
Page 169
De Re BASIC!
Gr.text.height returns information about how text would be drawn. It does not measure a drawn text
object, but uses information from the current Paint.
Gr.text.width and Gr.get.textbounds commands can return information about how text would be
drawn or how a text object was actually drawn. If used to measure the text of a string expression, they
use information from the current Paint. If used to measure the text of a text object that was already
drawn, they use information from the text object.
Gr.text.align {{<type_nexp>}{,<paint_nexp>}}
Align the text relative to the (x,y) coordinates given in the Gr.text.draw command.
type values: 1 = Left, 2 = Center, 3 = Right.
You may use the optional Paint pointer parameter <paint_nexp> to specify a Paint object to modify.
Normally this parameter is omitted. See Gr.color, Advanced usage for more information.
Gr.text.bold {{<lexp>}{,<paint_nexp>}}
Turns bold on or off on text objects drawn after this command is issued:
If the value of the bold parameter <lexp> is false (0), text bold is turned off.
If the parameter value is true (not zero), makes text appear bold.
If the parameter is omitted, the bold setting is toggled.
If the color fill parameter is 0, only the outline of the bold text will be shown. If fill <>0, the text outline
will be filled.
This is a "fake bold", simulated by graphical techniques. It may not look the same as text drawn after
setting "Bold" style with Gr.text.setfont or Gr.text.typeface.
You may use the optional Paint pointer parameter <paint_nexp> to specify a Paint object to modify.
Normally this parameter is omitted. See Gr.color, Advanced usage for more information.
Gr.text.size {{<size_nexp>}{,<paint_nexp>}}
Specifies the size of the text in pixels. The size <nexp> sets the nominal height of the characters. This
height is large enough to include the top of characters with ascenders, like "h", and the bottom of
characters with descenders, like "y". Character width is scaled proportionately to the height.
You may use the optional Paint pointer parameter <paint_nexp> to specify a Paint object to modify.
Normally this parameter is omitted. See Gr.color, Advanced usage for more information.
Gr.text.skew {{<skew_nexp>}{,<paint_nexp>}}
Skews the text to give an italic effect. Negative values of <nexp> skew the bottom of the text left. This
makes the text lean forward. Positive values do the opposite. Traditional italics can be best imitated
with <nexp> = -0.25.
You may use the optional Paint pointer parameter <paint_nexp> to specify a Paint object to modify.
Normally this parameter is omitted. See Gr.color, Advanced usage for more information.