1.
•
•
•
You
can
fill
a closed shape with the current INK colour by simply writing:
FILL 1
before the shape
is
drawn. The following program produces a green
Circle.
INK 4
F
ILL
1
CIRCLE
50,50,30
The FILL command works
by
drawing touching horizontal lines between suitable
points.
The statement:
FILL 0
will tum off the
FILL
effect:
You
can scroll or pan
the
display
in
a window
like
a
film
cameraman.
You
arrange scrolling
in
terms ot pixels. A positive number
of
pixels indicates upwards scrolling, thus
SCROLL
10
moves the display
in
the current window or screen
10
pixels downwards.
SCROLL
-8
Moves the display 8 pixels
up.
You
can add a second parameter
to
induce part-scrolling.
SCROLL
-8,
1
Will
scroll the part above (not including) the cursor line
and:
SCROLL
-8,2
will scroll the part below (not including) the cursor
line.
As
scrolling occurs, the space
left
by movement of the display
IS
filled
With
the current
paper colour A second parameter
a has no effect:
You
can
PAN
the display
in
the current window left or
right:
The
PAN
statement works
in
a similar manner
to
SCROLL but
PA
N
40
moves display right
PAN
-40
moves display left
A second parameter gives a partial
PAN
a - whole screen
3 - the whole of the line occupied by the cursor
4 - the right hand side
of
the line occupied by the
cursor.
The area of the cursor
is
also Included.
If
you are using stipples or are
in
8 colour mode then windows must be panned or
scrolled
in
multiples of 2 pixels.
Write a program which draws a Snakes and Ladders' grid of
ten
rows
of
ten
squares.
2.
Place the numbers 1
to
100
in
the squares starting
at
the bottom left and place
F for finish
in
the last square.
3.
Draw a dartboard on the screen.
It
should consist of an outer ring which could
hold numbers A 'doubles' ring and triples' ring
as
shown and a centre consisting
of a 'bull's
eye'
and a ring around
It:
Screen
Output
FILL
SCROLLING
AND
PANNING
PROBLEMS
ON
CHAPTER
12
12/84
73