Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-Filev_fillarea()$A006 - Filled Polygon Line-AFunction Draw a filled polygon line-by-line.
Parameters PTSIN contains the X/Y coordinate pairs of the vertices of
the polygon with the last point being equal to the first.
CONTRL[1] specifies the number of vertices. The rest of the
variables are consistent with previous usages.
Example ; Draw a filled polygon with vertices at
Binding ; ( 0, 0 ), ( 319, 120 ), and ( 25, 199 ).
move.l #ptsin,12(a5) ; PTSIN move.l #contrl,4(a5) ; CONTRL move.w #1,24(a5) ; COLBIT0 move.w #1,26(a5) ; COLBIT1 move.w #1,28(a5) ; COLBIT2 move.w #1,30(a5) ; COLBIT3 move.w #0,36(a5) ; WRMODE move.w #stipple,46(a5) ; PATPTR move.w #1,50(a5) ; PATMSK move.w #0,52(a5) ; MFILL move.w #0,54(a5) ; CLIP ; loop to draw the polygon
move.w #0,40(a5) ; upper Y line
move.w #199,d4 ; lowest Y line
; - upper Y line
loop:
.dc.w $A006
addq.w #1,40(a5)
dbra d4,loop
.data
ptsin:
.dc.w 0, 0, 319, 120, 25, 199, 0, 0
contrl:
.dc.w 0, 3
stipple:
.dc.w $AAAA
.dc.w $5555
Caveats Register A0, X1, and X2 are destroyed as a result of this
call.
See Also v_fillarea()