112 User's
Handbook
to the Atari
400
/
800
Computers
DRAWTO (DR.)
The
DRAWTO
statement
is
used in the graphics modes
to
draw
a
line. The arguments
of
the DRAWTO statement indicate the
column
and
row
where
that line ends.
CONFIGURATION
DRAWTO
a,b
Both arguments
of
a DRAWTO statement must be positive, and
if
they are
not
integers, they
will
be
rounded
off. The arguments
must
al
so
lie
within
the range
of
the display. For exampl
e,
GRAPHICS 3
has
40
columns
and
20
rows.
DRAWT040,20
wou
ld
result
in ERROR-141. Since the columns are
numbered
0
to
39
and the rows are
numbered
0 to
19,
DRAWTO
40,
20
contains
arguments
which
lie outside the range
of
display.
A
DRAWTO
statement must occur after a PLOT statement. PLOT
determines
the
starting
point
of
the line, and
DRAWTO
determines
the
end point. A
DRAWTO
statement can
follow
another
DRAWTO
statement,
if
the first DRA
WTO
is
preceded
by a
PLOT statement.
EXAMPLE
10
GRAPHICS 3
20
COLOR 1
30
PLOT
5,5
40
DRAWTO
10
,5
50
DRAWTO
10
,
10
60
DRAWTO
5,10
70
DRAWTO
5,5
A DRAWTO statement
thatfollows
another
DRAWTO
statement
wi
ll
use the
end
of
the
last
line to start the new line. The previous
example began by
plotting
a
point
at
line
30,
then
proceeded
to