CHAPTER 7
same as the hardware color registers numbers. The corre
spondence between the two is shown in Table 7-5.
Table 7-5. Correspondence Between Hardware Color Registers and
VDI Color Indices
Color Color
Index
Register Default Color
0
0 White
1
15*
Black
2 1
Red
3
2 Green
4
4
Blue
5 6
Cyan
6
3 Yellow
7
5 Magenta
8
7
Low White
9
8
Gray
10
9
Light Red
11 10
Light Green
12
12 Light Blue
13
14 Light Cyan
14 11 Light Yellow
15 13
Light Magenta
* Color register 3 in medium resolution (4-color) mode
The fill pattern and writing mode used for fill are deter
mined by the same variables as the other line A fill routines.
The color of the filled object is not specified by the COLBIT
variables, however. The fill color is taken from the current
VDI virtual screen workstation. If you haven't opened a VDI
workstation, however, you can still use the Seed Fill function
by creating a dummy virtual workstation variable table. This
is just an array of 16 words, the last of which contains the
VDI color index of the fill color. A pointer to this array must
be stored in the CUR
__
WORK variable.
There are two final points to note about the Seed Fill
routine. This routine always evaluates the XMINCL,
YMINCL, XMAXCL and YMAXCL variables, whether or not
you've set CLIP on. Therefore, make sure your clipping rec
tangle is set correctly before making this call. Secondly, this
function calls a user-defined subroutine after each horizontal
line has been filled. Since a complex fill can be a lengthy pro
cess, this hook was added to allow the programmer to abort
the Seed Fill function before it finishes. If the subroutine re
148