CHAPTER 7
The first of the routines that use a fill pattern is the Hor
izontal Line function ($A004). This function is similar to Arbi
trary Line, except it is only used when Y1 and Y2 are the
same. It is a bit faster in execution than Arbitrary Line. The
input variables required for this function are shown in Table
7-1.
Table 7-1. Input Variables for Horizontal Line Function
Offset Name Offset Description
COLBITO $18 Bit value for color plane 0
COLBIT1 $1A Bit value for color plane 1
COLBIT2 $1C Bit value for color plane 2
COLBIT3 $1E Bit value for color plane 3
WMODE $24 Writing mode
XI $26 Starting x coordinate
Y1 $28 Starting (and ending) y coordinate
X2 $2A Ending x coordinate
PATPTR $2E Pointer to fill pattern array
PATMSK $32 Pattern index (length - 1)
MFILL $34 Multicolor fill pattern flag (zero = single
plane, nonzero = multi-plane)
The first seven of these variables should be familiar from
the Arbitrary Line function, above. The last three, however,
pertain to the fill pattern. PATPTR contains a pointer to the
array of line masks that form the fill pattern mask. PATMSK
is used as an index into the pattern array and should contain
the length of the array (in words), minus one. MFILL is a
flag that indicates whether the pattern contains a single color
plane, or multiple bit planes. A zero indicates a single bit
plane, in which case WMODE as well as the COLBIT vari
ables determine the pattern color. A nonzero value indicates
a multiplane fill, which replaces the destination bitplanes
without regard for WMODE.
The next filled shape function is Filled Rectangle
($A005). This function draws a series of filled horizontal lines
of equal length. The input values it requires are shown in Ta
ble 7-2.
Table 7-2. Input Values for Filled Rectangle Function
Offset Name Offset Description
COLBITO $18 Bit value for color plane 0
COLBIT1 $1A Bit value for color plane 1
COLBIT2 $1C Bit value for color plane 2
COLBIT3 $1E Bit value for color plane 3
144