Amos Professional Manual  Contents  Index

Interface Language


The next pair of functions keep track of the graphics cursor. This is automatically positioned at the location of the last drawing operation on the screen.

XA
YA
Interface functions: get previous coordinates of graphics cursor
x=XA
y=YA

XA and YA retain a copy of the graphic coordinates, at their position before the most recent graphics operation was performed. This pair of values can be very useful when objects need to be defined relative to one another, as you will only have to set the coordinates of the first object, and all of the others will be relative to it. For example:

X> GraphicSquare 10,10,30,30; draw a box at 10,10
   GraphicSquare XA,40,XA 20+,30; draw a box immediately below at 10,40

XB
YB
Interface functions: get current coordinates of graphics cursor
x=XB
y=YB

These two functions complement the previous pair, and they return the position of the graphics cursor after the execution of the most recent instruction. Here are some schematic examples:

X> BUtton 1,160,100,...;[][]
   BUtton 2,XB,YA,...;[][]

X> PRint 0,8,"Hello, first line",2;
   PRint XA,YB,"This line will be directly under!",2;

The Graphics Commands
Here are all of the AMOS Professional Interface graphics commands. They fall into the following main groups: boxes and bars, lines and outlines, and the text commands. Most of these Interface instructions are very similar to their normal AMOS Professional equivalents.

Boxes and Bars

GraphicBox
Interface instruction: draw a filled box
GB x1,y1,x2,y2;

To draw a box that is filled with the current colour, the GraphicBox command is followed by familiar top left-hand corner coordinates, and then the coordinates of the diagonally opposite corner.

Back    Next
09.02.02