Atari ST series Technical Reference Manual page 175

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

the character to print, subtracting the ASCII value of the first
printable character in the font (which is also found in the
header), and multiplying by 2, you come up with the begin­
ning x offset for the character. SOURCEY is usually set to 0,
indicating that you wish to print the character from the top
line. DESTX and DESTY are set to the x and y screen posi­
tion at which you wish the character to be printed.
If you're using the system fonts, text printing will be sig­
nificantly faster if characters are printed on byte boundaries,
since the pixels of the text characters won't have to be
shifted. The height of the blit rectangle goes in DELY and
can be taken from the text header offset form__height. To
find the width of the character, you may again use the off__
table value used to find the character's x position. By sub­
tracting the x position of the next character from that of the
current character, you can determine the width of the current
character.
Once you've specified the size and position of the source
and destination rectangles, you're ready to specify the blit
mode. TextBlt allows you to use either the VDI blit modes or
the BitBlt modes. A value of 0-3 in WMODE indicates one of
the VDI modes, while a value of 4-19 specifies of the BitBlt
modes. If using the VDI modes, the foreground and back­
ground colors for the text are stored in TEXTFG and
TEXTBG. The normal clipping variables may be used to set a
clipping rectangle for TextBlt.
Text characters may be printed out normally, or special
effects may be added to alter their appearance, making them
print out in boldface, italics, lightened, or outlined. Various
bits in the STYLE variable are used to select these effects (see
the input parameter table, above).
If you're using special effects, set aside a scratch buffer
that TextBlt can use to distort the character. This buffer
should be twice as large as the width of the distorted charac­
ter. A pointer to the buffer should be placed in SCRTCHP
and the offset to the second half of the buffer placed in
SCRPT2.
Depending on the effect, you may need to set some
other variables as well. For skewing (italics), set SKEWMASK
to the value found in the font header variable SKEWMASK.
Also set LOFF and ROFF from the font header variables
left__offset and right__offset. For thickening (boldface), set
Line A Routines
167

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents