EasyManua.ls Logo

Commodore Plus 4 - RS-232 Interface; Opening The RS-232 Channel

Commodore Plus 4
464 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...
198
Programming
Graphics
You
can
change
the
pixel
cursor
location
with
the
LOCATE
statement,
and
BASIC
may
change
the
pixel
cursor
location
when
a
drawing
is
done.
When
you
want
to
use
the
default
value
of
the
pixel
cursor's
coordinates
in
a
drawing
statement,
but
need
to
specify
one
of
the
later
parameters,
only
one
empty
position
must
be
left
(NOT
one
for
x
and
one
fory).
For
example,
the
BOX
statement:
BOX
color,xl,yl,x2,y3,angle,paint
flag
defaults
the
second
set
of
coordinates
to
the
pixel
cursor.
If
you
want
to
do
this,
but
also
want
your
box
painted,
the
following
can
be
used:
B0Xl,10,10,,45,l
This
statement
draws
a
filled-in
box
in
foreground
color
between
the
absolute
coordinates
(10,10)
and
the
pixel
cursor
at
an
angle of
45
degrees.
The
pixel
cursor
may
be
used
as
a
reference
for
relative
coordinates.
That
is,
you
can
specify
coordinates
relative
to
the
pixel
cursor's
current
coordinates.
This
is
useful
when
you
want
to
be
able
to
execute
the
same
series
of
drawing
steps
at
various
different
locations
on
the
screen.
Two
types
of
relative
coordinates
are
available.
The
first
is
rectangular
relative
coordinates.
Instead of
specifying
an
absolute
x
and
y
coordinate,
you
specify
changes
in
x
and
y
from
the
pixel
cursor's
current
location.
This
is
signaled
by
the
use
of
a
plus
(+)
sign
for
a
positive
change
or a
minus
(-)
sign
for
a
negative
change.
For
example,
the
statement
CIRCLE
l,+10,-30,20
draws
a
circle
of
radius
20
with
its
center
10
pixels
to
the
right
and
30
pixels
above
the
pixel
cursor's
location.
The
second
type
of
relative
coordinate
is
polar.
Instead
of
specifying
an
absolute
x
and
y
coordinate,
you
specify
a
distance
and
an
angle
from
the
pixel
cursor's
current
location.
The
distance
is
specified
first,
then
separated
from
the
angle
(in
degrees)
by
a
semicolon.
For
example,
the
statement
CIRCLE
1,15;45,S5
draws
a
circle
of
radius
25
with
its
center
15 pixels
from
the
pixel
cursor's
location
at
an
angle
of
45
degrees.
Relative
Coordinates
Example Program
10
GRAPHIC1,1
20
READX,Y,C,L:IFX<0THEW40

Other manuals for Commodore Plus 4

Related product manuals