CHAPTER 7
move.w #$d0,XMAXCL(a5)
move.w # 0,YMINCL (a5)
move.w #$bO,YMAXCL(a5)
* to (0,0)-($d0.$b0)
*** draw filled box with Horizontal line function
move.1 #$00800030,Xl(a5)
move.w #$0120,X2(a5)
move.w #31,d4
nextline:
dc.w Hline
addq.w #l,Yl(a5)
dbra d 4 ,nextline
* xl=$80, yl=$30
* x2=$120
* draw 32 horiz. lines
* draw a line
* go down one line
* if not done, draw next
*** draw a box using Rectangle Fill function
move.w
move.w
move. w
move.w
#1,COLBITO(a5)
#l,COLBITl(a5)
#l,COLBIT2(a5)
#l,COLBIT3(a5)
move.w #3,WMODE(a5)
move.l #$00200020,XI(a5)
move.l #$00600060,X2(a5)
dc.w RectFill
*** Polygon fill
move.w #0,WMODE(a5)
move.l #pat2,PATPTR(a5)
move.w #0,PATMSK(a5)
move.l #points,PTSIN(a5)
move.l #length,CONTRL(a5)
move.w
move.w
fillnext:
dc.w
addq
dbra
#$70,Yl(a5)
#$50,d4
PolyFill
#l,Yl(a5)
d4, fillnext
1 in all color bits
= 1111
or color 15 (black)
reverse transparent mode
xl=$20, yl=$20
x2—$60, y2=$60
draw a filled box
draw with replace mode
set solid fill pattern
1 word long
addr of points array to PTSIN
number of line segments to CONTRL
1st (top) line to draw in Yl
draw 80 lines
fill one horizontal line
?
o to next line
f not done, fill it too
*** draw triangle outline with Arbitrary, line function
move.w
#$FFFF,LNMASK(a5)
*
solid line
move.w #OfWMODE(a5)
*
replace mode
move.w #2,d3
*
draw 6 lines
move.1
#pointsl,a3
*
get address of array
drawnext:
move.1
(a3)+,Xl(a5)
*
starting x & y
move.1 (a3),X2(a5)
*
ending x & y
dc.w Aline
*
draw the line
dbra d3,drawnext
*
if not done, draw next line
*** do a contour fill of the triangle in outline mode
move.1
move.w
move.1
move.1
move.l
move.1
dc.w
#love,PATPTR(a5)
#15,PATMSK(a5)
#vwork,CUR_W0RK(a5)
#fillpt,PTSIN(a5)
#fillcol,INTIN(a5)
#NoAbort,SEEDABORT(a5)
SeedFill
set old fill pattern
and length of fill pattern
set pointer to fill color
set pointer to fill coordinate
set pointer to outline color
set pointer to abort routine
fill the triangle
*** do a contour fill of the filled polygon, in color mode
move.l #fillptl,PTSIN(a5)
move.l #fillcoll,INTIN(a5)
dc.w SeedFill
* set new fill coordinate
* set negative fill color
* fill 'er up
*** wait for key press, then end
* call conin() to wait for key press
move.w
trap
addq.1
#l,-(sp)
#1
#2, sp
150