Amos Professional Manual  Contents  Index

Graphics


In this Chapter, you will learn how to master the arts of form and colour.

AMOS Professional allows the programmer to harness the Amiga's full graphic potential, and all aspects of design can be controlled simply, accurately and almost instantaneously. The computer-graphics artist is provided with a standard electronic canvas 320 pixels wide and 200 pixels high, and there are potentially 4096 different colours to exploit. In order to apply the chosen colour to the correct point, you will need to know the coordinates of each available pixel, and as long as these graphic coordinates are not confused with the broader scale of text coordinates, all will be well.

Graphic coordinates

PLOT
instruction: plot a single point
Plot x,y
Plot x,y,colour

This is the simplest drawing command of all, and plots a single pixel of ink colour between graphic coordinates 0,0 and 319,199. When followed by specific x,y-coordinates, the current ink colour will be plotted at this new position. You are allowed to omit either the x or the y- coordinate, provided the comma is left in the correct position. If an optional colour index number is added the new colour will be used for this and all subsequent drawing operations. For example:

E> Cls: Curs Off
   Do
    Plot Rnd(319),Rnd(199),Rnd(15)
   Loop

POINT
function: return the colour of a point
c=Point(x,y)

Use this function to find the index number of the colour occupying your chosen coordinates, like this:

Cls : Plot 160,100
Print "The colour is ";Point(160,100)

Setting the graphics cursor

GR LOCATE
instruction: position the graphics cursor
Gr Locate x,y

The graphics cursor sets the starting point for most drawing operations. To establish this point, use GR LOCATE to position the graphics cursor at your chosen coordinates.

Back    Next
06.04.01