Amos Professional Manual  Contents  Index

Graphics


For example:

E> Cls : Curs Off : Ink 3
   Gr Locate 160,100
   Circle ,,45 : Wait 100: Flash Off
   Do
    Ink Rnd(15) : X=Rnd(250) : Y=Rnd(150) : R=Rnd(90)+1
    Circle X,Y,R
   Loop

ELLIPSE
instruction: draw an elliptical outline
Ellipse x,y,radius1,radius2

An ellipse is drawn in a similar way. After the x,y-coordinates have set the centre location, two radii must be given, one to set the horizontal width and the second to set the height of the ellipse. Coordinates may be omitted as usual, providing the commas remain in place. For example:

E> Ellipse 100,100,50,20
   Ellipse ,,20,50

CLIP
instruction: restrict drawing to a limited screen area
Clip Clip x1 ,y1 To x2,y2

This command is used to set an invisible rectangular boundary on the screen, using the normal top left-hand corner to bottom right-hand corner coordinates. All subsequent drawing operations will be clipped off when they reach these boundaries. To toggle the command and restore the normal screen display area, use CLIP and omit the coordinates. Areas that are preserved outside of the clipped zone can be used for items such as borders and control panels. For example:

E> Clip 150,5 To 280,199
   For R=4 To 96 Step 4
    Gr Locate 150,R+5
    Ellipse ,,R+9,R
   Next R

Selecting colours
The next part of this Chapter explains how the AMOS Professional programmer is free to exploit the Amiga's superb colour-handling features. Although the Amiga only provides 32 colour registers, AMOS Professional allows the use of colour numbers ranging from 0 to 63. This is in order to make full use of the extra colours available from the Half-Bright and HAM modes, as explained in Chapter 6.1.

Back    Next
06.04.04