AMSTRAD cpc 6128 User Instruction page 421

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

10 REM mask and tag in window
20 MODE 1:INK 2,10,4:INK 3,4,10
30 ORIGIN 440,100,440,640,100,300
40 WINDOW 1,26,1,25
50 CLG 2
If you RUN thIs program you will see a square of flashing colour halfway down the
right-hand side of the screen. This square has been cleared to ink number 2 (flashing
magenta/cyan) by line 50, and the origin of co-ordinates has been moved to the
bottom left hand corner of the square. The MOD E command has set the graphics
cursor to the origin of co-ordinates (X=O, Y =0) so we can draw a diagonal line across
the square with line 60:
60 DRAW 200,200,3
RUN the new program to see the effect. Now add:
80 MOVE 0,2:FILL 3
Line 80 puts the graphics cursor just inside one of the two halves of the square and
fills it with ink 3. The boundary of the fill is the edge of the graphics window (in this
case also the edge of the square) and anything drawn in the current graphics pen (3)
or anything drawn in the ink being used to fill (also 3).
Now RUN the resulting program.
To prove the point about 'fill' edges, add line 70 below. Note that it is only the fact
that the fill is in the same ink as the diagonal line that restricts the fill to half the
square.
70 GRAPHICS PEN 1
run
Edit line 80 to F ILL with ink 1 then RUN to prove this last point. Then restore it
back to the original ( F ILL 3).
Now add lines 1 00 to 1 40, which draw a box:
100 MOVE 20,20
110 DRAW 180,20
120 DRAW 180,180
130 DRAW 20,180
140 DRAW 20,20
run
Chapter 9 Page 48
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents