EasyManua.ls Logo

Commodore Plus 4 - Page 105

Commodore Plus 4
234 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...
SQUARES,
CIRCLES,
POLYGONS,
AND
PAINTING
Drawing
Rectangles
Using
the
DRAW
command,
you can
draw
pictures
by
plotting
many
dots
or
lines.
To
draw
a
square,
you
can
use
the
command
DRAW
1,0.0
TO
100.0
TO
100,100
TO
0,100
TO
0,0
(plotting
each
endpoint
of
the
square)
or
you
can
just
use
the
BOX
command.
THE
BOX
COMMAND
Your
Plus'4
includes
a
command
to
make
it
easier
to
draw
squares
and
other
rectangular
shapes.
The
BOX
command
lets
you
pick
the
points
of
2
opposite
corners
of
the
square.
To
duplicate
the
same
box
as
in
the
above
example,
just
use
BOX
1,0,0,100,100-
The
number
1
again
means
that
you
want
to
draw
and
not
erase.
The
next
four
numbers
are
the
coordinates
of
the
box's
opposite
corners,
{0,0}
at
the
upper-left
corner
and
(100,100)
near
the
middle
of
the
screen.
The
BOX
command
can
form
any
rectangle
just
by
changing
the
cor
ners.
You
can
even
rotate
the
box
by
specifying
an
angle
(in
degrees)
after
the
last
coordinate,
like
this:
BOX
1,50,50,100,100,45.
The box
is
rotated
45
degrees
clockwise.
If
you would
like
to
draw
a
solid
box
instead
of
just
the
outline,
you
just
add
a
comma
1
after
the
angle.
A
solid
box
at
the
center
of
the
screen
is
shown
as
BOX
1,100,50,220,150,,1.
Notice
that
you
need
a
comma
to
take
the
place
for
the
angle,
even
though
you
don't
want
the
box
rotated.
Some
typical
forms
of
the
BOX
command
are:
COMMAND
BOX
on,
columni,
row!,
column2,
row2
BOX
on.
con,
rowl,
col2,
row2,
angle
BOXon.coM,
row1.col2,
row2,
,
fill
BOX
off,
col1,row1,
col2,
row2,
angle,
fil
EFFECT
Outline
Rotated
Solid
box
Erase
area
of
screen
Here
are
a
couple
of
programs
that
use
the
BOX
command:
Don't
forget
to
type
NEW
then
hit
RETURN
before
entering
each
program,
and
press
return
after
typing
in
each
line.
10
COLOR
0,1
20
COLOR
1,2
30
GRAPHIC
2,1
40A=RND(l)*20
+
10
97
continued
on
next
page

Other manuals for Commodore Plus 4

Related product manuals