AMSTRAD cpc 6128 User Instruction page 423

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

Advertisement

Now RUN, and once again the dotted box is symmetrical. Note that if the second
M ASK parameter is " l' the command will be reset
to
draw whole lines including the
first pixel.
Now look in between the dashes of the line. There is something in the bottom right
triangle which is not in the top left triangle. This is the graphics paper, which is set
to
ink 2 by the
C
L G 2 command in line 5 0, but is invisible in the top left triangle
because it is the same colour as the background. Alter line 50 to read:
50 CLG 2:GRAPHICS PAPER 0
.... and re-run the program. The paper now shows up clearly all round the box.
It is possible to make the graphics paper invisible, or, as we call it 'transparent'. This
means that a dotted line drawn over an existing picture will preserve the gaps
between the dots. The graphics drawing is made transparent by adding a " 1 '
parameter to the G RAP
HIe
S PEN command. (It is reset to non-transparent or
'opaque' by a
',0'
parameter). Alter line
70
to read:
70 GRAPHICS PEN 1,1
run
.... and observe the result.
As well as drawing lines (and plotting points) it is possible to write normal text
characters at the position ofthe graphics cursor. This has the advantage that we can
position the characters with much greater accuracy (within one pixel rather than
within 8 pixels) and also that we can draw characters with the added flavour of
graphics ink modes (see ahead).
To write characters at the graphics cursor location, simply position the graphics
cursor at the top left-hand corner of where you want the character to be drawn, then
issue the command TAG (or TAG # 1 etc, for other text streams) followed by normal
PR I N T ing commands. The graphics cursor is automatically stepped right by 8 pixels
after each character is drawn. Add:
160 MOVE 64,108
170 TAG
180 PRINT "SALLY"
190 TAGOFF
run
(Any messages output by BASIC will be sent to the text screen irrespective of the
state of the TA G/T AGO F F switch, but it is good practice to cancel the TAG
assignment as soon as the TAGgingisover.)
Chapter 9 Page 50
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents