Go to the previous, next section.
In previous examples we used aa_defparams
without description. This
variable says to AA-lib what hardware do you expect.
struct aa_hardware_params { struct aa_font *font; int supported; int minwidth, minheight; int maxwidth, maxheight; int recwidth, recheight; int mmwidth, mmheight; int width, height; };
Filed font
contains the default font. If your driver is unable to
autodetect the font used by the output device (such as terminal drivers or
most of saving drivers), you may want to select one of the fonts compiled
into aalib.
Following fonts are available: font8
, font14
, font16
, font9
, fontline
, fontgl
, fontX13
, fontX16
, fontX13B
.
If you specify NULL
as an argument font16
is used.
Integer supported
contains a mask. Following masks are available:
AA_NORMAL_MASK
, AA_DIM_MASK
,
AA_BOLD_MASK
, AA_BOLDFONT_MASK
, AA_REVERSE_MASK
.
You can use AA_EXTENDED
to enable all 256 of characters
or AA_EIGHT
to enable using of characters numbered higher
than 127. This should be set also after the initialization using
aa_setsupported
Other fields are used to specify the display size. If your program
requires a fixed size of the display you should set width
,height
fields (otherwise expect problems ;).
You can also adjust how tolerant AA-lib should be. Minimum is set by
minwidth/minheight
, maximum is set by maxwidth/maxheight
.
Then you can set width/height
parameters and call the init function.
The nearest value (in specified bounds `coz) will be set.
If all these fields are set to zero (default) hardware drivers prompt user
for the size and memory/save drivers will set some defaults. Hardware drivers
also
have default values(forced by enter). If you wanted to modify them you'd have to
set recwidth/recheight
. Note that
minwidth/minheight
and maxwidth/maxheight
still have an effect
even if width/height
is zero.
It is recomended to set all the parameters that can be alternated by user
just before aa_parseoptions
is called, so options can't be changed.
mmwidth/mmheight
should be used to specify size of window in
milimeters (but it is ignored by all drivers now ;).
Go to the previous, next section.