Atari ST series Technical Reference Manual page 154

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Table 7*3. Input Values Used by Filled Polygon (continued)
Offset Name
Offset
COLBIT3
$1E
WMODE
$24
Y1
$28
PATPTR
$2E
PATMSK
$32
MFILL
$34
CLIP
$36
XMINCL
$38
YMINCL
$3A
XMAXCL
$3C
YMAXCL
$3E
This function draws a filled shape that can have any
number of vertices. The x and y coordinate pairs are placed
into an array and a pointer to that array is placed in the
PTSIN variable. Since these points must describe a closed fig­
ure, the last point must be the same as the first one. The to­
tal number of points in the figure must be placed in the sec­
ond word of an array and a pointer to this array must be
placed in the CONTRL variable.
The Filled Polygon function only draws one horizontal
line of the figure at a time. The value in Y1 determines
which line is drawn. To draw the entire filled shape, place
the top line number of the shape in Y1 and call Filled Poly­
gon repeatedly, incrementing the value of Y1 after each call
until the bottom line of the figure has been reached. Note
that each call to Filled Polygon changes the value in the line
A variable XI and X2 and destroys the AO register.
The final line A fill routine is called Seed Fill ($A00F).
This function is equivalent to the VDI's Contour Fill function,
which is used to fill an enclosed polygon with the current fill
pattern and color. A polygon can be filled in either of two
modes. In outline mode, the fill spreads from an initial point
in all directions until it comes to an outline of a given color.
In color mode, the fill spreads from the initial point until it
reaches a color other than that of the initial point. The func­
tion uses the line A variables for input shown in Table 7-4.
146
CHAPTER 7
Description
Bit value for color plane 3
Writing mode
y coordinate of horizontal line segment(s)
to draw
Pointer to fill pattern array
Pattern index (length-1)
Multicolor fill pattern flag (zero = single
plane, nonzero = multiplane)
Clipping flag (0 = off, nonzero = on)
Coordinate of left side of clip rectangle
Coordinate of top of clip rectangle
Coordinate of right side of clip rectangle
Coordinate of bottom of clip rectangle
*

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents