EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - Page 35

Radio Shack TRS-80 X-PAD GT-116
65 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...
buff/cyan/magenta/orange
(from
green/yellow/blue/red).
Buff is the new
background
color.
Since you are in a new
color set,
you'll have to
also
change the colors
in
our
program.
Since
the
background
is
buff,
the color choices are
cyan, magenta,
and
orange.
Change the
color of the margins for this
new
color set:
190 C=G:GOTO 230
200
C=7:G0T0
230
210
C=8:G0T0 230
310 IF A <> 1
THEN
360
RUN the program. The
Cursor
shows up
well
on
the
buff
background and looks
like
an
orange-colored
pixel. The
Cursor moves across the
Screen
as
you move
the Pen.
Experiment with the Cursor by
moving the
Pen just
above
the
Display
Area.
Experiment with the new
color-coded
margins.
Now,
change the
order of the
margins
again:
190 C=7:G0T0 230
200 C=8:G0T0 230
210 C=6:G0T0 230
Try painting with these
new color-coded
margins.
Change
the order again:
190
C=8:G0T0
230
200 C=B:GOTO 230
210
C=7:G0T0
230
Say,
you're quite
a
programmer (and you
thought
programming was hard)\
Painting
In Circles
To
draw and paint
circles (instead of
boxes),
change
line
140 in the
paint
program
to:
140
L=ABS<X1-X>
(
(L*L)+(C*C) )
and
add
line 145:
145
CIRCLEOC1 tYl
)
,R
!C=AB3(Y1-Y)
:R=SQR
Hints
and
Tips
On
Painting with
the
X-Pad .
.
.
Four-color mode
You
can only
paint in a
PMODE
that
has
a
four-color mode
(i.e.,
PMODE
3
or
1).
Move to the
center
When using
Screen
Set
(background color:
green),
it is
nearly
impossible
to
see
the green
Cursor. To be
sure you
paint
the
right
figure, move
the
Pen
as
near
the
figure's
center
as
possible.
Last
margin default
The PAINT
statement
uses
the
color of the last
margin
specified.
Once you
move
the
Pen
to a
margin, you can
paint
all the
figures
and
the
background
in that same
color. To use
another
color,
just
specify that
color-coded
margin. Try
this
for
yourself. Draw
five
circles and press
the
margin
for
a
color. Paint
the five
circles, and
then
the
background,
with this color.
Re-painting
If
you
paint a figure
with
the same
foreground
and
background color, you
won't
be
able to
repaint the
figure or draw
another
figure
until you
clear the
Screen.
To see this
for yourself,
paint a
figure and the
background
the same
color.
Stops at
boundary
Paint
works
the
same
with
background
painting as
it
does
with
foreground
painting
it stops
when
it reaches a
boundary
of a
figure on the
Screen.
To paint
this
unpainted
area,
you'll have
to press the
Pen down in
that
area.
Draw
two
adjoining figures and
try this
yourself.
Important!
Because
of
characteristics
of the
Color
Computer,
once you
have
chosen red
or
orange,
the
only
way to
change
color sets
is to
clear
the
Screen
and
start
over. See pages
48-51
of
your
Extended
Color
BASIC
manual.
Chapter
9
Checkpoint
1.
(True/False)
Through
your
program,
you
can
color-code
three
of the
four
margins
on
X-Pad.
2.
(True/False)
Whenever
you
want
to
clear
the
Screen,
just
move
the
Pen to
the
bottom
margin.
28