Atari ST series Technical Reference Manual page 151

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

m o v e .w
#0,COLBIT3(a0)
80,LSTLIN(aO)
move.w
move.w
8$EEEE,LNMASK(aO)
#0,WMODE(aO)
jnove.w
move.w
#5,d3
fpoints,a3
mo v e . 1
nextline:
mo v e . 1
(a3)+,Xl(aO)
move.1
(a3),X2(aO)
dc.w
Aline
d3,nextline
dbra
*** wait for key press, then end
move.w
#l,-(sp)
trap
#1
addq.l
#2,sp
#0,-(sp)
m o v e .1
trap
#1
*** Data for input is stored here
.data
points:
dc.w
dc.w
.end
There is another line A routine ($A004) used only for
drawing horizontal lines. If you know that your line will be
horizontal, you may wish to choose that function, as it's
slightly faster for horizontal lines. Since that function uses
some of the filled shape drawing variables, however, it will
be discussed in the following section on drawing filled
shapes.
Drawing Filled Shapes
Line A provides a number of functions for drawing filled
shapes. These functions introduce some new concepts. The
first is the fill pattern. A fill pattern is an array of line patterns
that is repeated in two dimensions. A pattern is 16-bits wide
and as high as you wish to make it, though the pattern
should be a power of two in length (one line, two lines, four
lines, sixteen lines, and so on). It's also possible to create
multicolor fill patterns. In these patterns, there is a separate
array for each color bit plane.
Another concept used by the filled shape routines is the
clipping rectangle. When you set up a clipping rectangle, spec­
ify that drawing operations will only be carried out within a
designated portion of the screen. If you set a clipping rectan­
gle that extends from coordinates 0,0 to 150,150, and turn
clipping on, only the part of the filled shape that falls within
this area will actually be drawn.
Line A Routines
* or color 1
* draw last point on line
* dashed line
* replace mode
* draw 6 lines
* get address of array
* starting x & y
* ending x & y
* draw the line
* if not at end, draw next line
* call conin() to wait for key press
* GEMDOS terminate command
* call GEMDOS and exit
150,49,250,99,250,149,150,199
50,149,50,99,150,49
143

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents