EasyManua.ls Logo

Husky Hunter - Page 131

Husky Hunter
499 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...
BASIC PROORAHHING SECTION 4.7
4,7.2
VER.V09F
GRAPHICS DEMONSTRATIONS
The following program will draw a number of circles across the
screen and back again:
10 SCREEN 1
20 FOR K=l TO 167 STEP 4
30 CIRCLE (K+30,32),30
40 NEXT K
50 CLS
60 FOR K= 167 TO 1 STEP
-4
70 CIRCLE (K+30,32),15
80 NEXT K
90 CLS
100 GOT020
The 'LINE' command may also be used for drawing boxes as well as
drawing lines. The command:
10 LINE (100,40)-(200,20)
will draw a line from the co-ordinates 100,40 to 200,20, the top
left hand corner of the screen being O,O. The following will
draw a box with the bottom left hand comer at point 100,20 and
the top right hand comer at 200,20:
10 LINE (100,40)-(200,20), 1,B
if the second parameter is used then the first must also be
specified. The box may be filled in by appending 'F' to the
second parameter.
The Graphic's cursor can be positioned to any point on the
screen by using the 'LOCATE' command. Pixels are set by using
'PSET' or cleared by 'PRESET'. The following example will
produce a dotted line across the screen:
10 SCREEN 1
20 FOR X:O TO 239 STEP 4
30 PSET (X;30)
40 NEXT X
50 END
PAGE 4 -
16