TextVBT
;
some of the others are margins, fonts, color and alignment.
The default horizontal alignment and vertical alignment is 0.5.
This means that the text is centered inside the rectangular window.
To get left justification the setting of halign
is 0.0.
The default font is Font.Builtin
.
Other fonts can be chosen using Font.FromName
,
assuming that they are available from the X Window System.
By default, the foreground and background colors of the text
are white and black,
but different colors are possible.
A TextVBT
requires that the colors be specified
by a collection of four painting operations called a ColorQuad
.
The most common collection requires specifying the foreground and
background colors that should be used in the ``painting'' of the text VBT.
This collection is constructed using the MakeColorQuad
function.
The colors themselves are specified by their red/green/blue components.
The program
Main.m3
uses characters from the ISO Latin-1 character set.
Character names, for instance, the upside down question mark
and the ``e'' with the acute accent, can be obtained from the
module Latin1Key
.
This module is part of the standard Modula-3 distribution and plays
no particular role in Trestle.
The constants in Latin1Key
can be used to select
the correct character from the 8-bit, discrete type CHAR
.
The following images
ha
is 0.0, the text is left justified.
Since va
is 0.4, the text is slightly above the center of window.