Sinclair QL Beginner's Manual page 17

Hide thumbs Also See for QL:
Table of Contents

Advertisement

CHAPTER 3 - DRAWING ON THE SCREEN
In order to use either a television set or monitor with the QL, two different screen modes are available.
MODE 8 permits eight colour displays with a graphics resolution of 256 by 256 pixels and large
characters for display on a television set. MODE 4 allows four colours with a resolution of 512 by 256
pixels and a maximum of eighty character lines for which a monitor must be used for successful
display. However, it would be unfortunate if a program was written to draw circles or squares in one
mode and produced ellipses or rectangles in another mode (as some systems do). We therefore
provide a system of scale graphics which avoids these problems. You simply choose a vertical scale
and work to it. The other type of graphics (pixel oriented) is also available and is described fully in a
later chapter.
Suppose, for example, that we choose a vertical scale of 100 and we wish to draw a line from position
(50,60) to position (70,80).
A COLOURED LINE
We need to specify three things:
PAPER (background colour)
INK (drawing colour)
LINE (start and end points)
The followingprogram will draw a line as shown in the above figure in red (colour code 2) on a white
(colour code 7) background.
NEW 
10 PAPER 7 : CLS 
20 INK 2 
30 LINE 50,60 TO 70,80 
RUN 
In line 10 the paper colour is selected first but it only comes into effect with a further command, such
as CLS, meaning clear the screen to the current paper colour.
MODES AND COLOURS
So far it does not matter which screen mode you are using but the range of colours is affected by the
choice of mode.
MODE 8 allows eight basic colours
MODE 4 allows four basic colours

Advertisement

Table of Contents
loading

Table of Contents