EasyManua.ls Logo

Commodore 128D - Page 110

Commodore 128D
427 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
u
Drawing
a
Box—
Now
try
a
box.
To
draw
a
box,
type:
80
BOX1,20,100,80,160,90,1
y
This
draws
a
solid
box
to
the
left
of
the
circle.
To
find
out
what
the
numbers
in
the
box
statement
mean,
consult
Chapter
V,
BASIC
7.0
[
j
Encyclopedia.
The
BOX
statement
has
seven
parameters
you
can
select
and
modify
to
produce
different
types
of
boxes.
Change
the
foreground
color
and
draw
the
outline
of
a
box
to
the
right
of
the
CIR
CLE
with
these
statements:
90
COLOR1,9:REM
CHANGE
FOREGROUND
COLOR
100
BOX1,220,100,280,160,90,0
Experiment
with
the
BOX
statement
to
produce
different
variations
of
rectangles
and
boxes.
Drawing
Lines,
You
now
know
how
to
select
graphic
modes
and
Points
and
colors
and
how
to
display
circles
and
boxes
on
Other
Shapes—
the
screen.
Another
graphics
statement,
DRAW,
The
lets
you
draw
lines
on
the
screen
just
as
you
DRAW
Command
would
with
a
pencil
and
a
piece
of
paper.
The
following
statement
draws
a
line
below
the
boxes
and
circle.
120
DRAW
1,20,180
TO
280,180
Here's
what
the
numbers
mean:
1
is
the
color
source
(in
this
case
the foreground)
20
is
the
starting
X
(horizontal)
coordinate
180
is
the
starting
Y
(verticle)
coordinate
280
is
the
ending
horizontal
coordinate
180
is
the
ending
verticle
screen
coordinate.
To
erase
a
drawn
line,
change
the
source
(1)
in
the
DRAW
statement
to
0.
The
line
is
drawn
with
the
background
color
which
erases
the
line.
Try
using
different
coordinates
and
other
sources
to
become
accustomed
to
the
DRAW
statement.
The
DRAW
statement
can
take
another
form
that
allows
you
to
DRAW
a
line,
change
direction
and
then
DRAW
another
line,
so
the
lines
are
continuous.
For
example,
try
this
statement:
130
DRAW
1,10,20
TO
300,20
TO
150,80
TO
10,20
This
statement
DRAWs
a
triangle
on
the
top
of
the
scren.
The
four
pairs
of
numbers
represent
the
X
and
Y
coordinates
for
the
three
points
of
the
triangles.
Notice
the
first
and
last
coordinates
are the
102
USING
C128
MODE—Color,
Animation
and
Sprite
Graphics
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals