Amos Professional Manual  Contents  Index

Graphics


For example:

E> X=150 : Y=10
   For R=3 To 87 Step 3
    Gr Locate X,Y+R
    Circle ,,R
   Next R

XGR
YGR
functions: return the relevant coordinate of the graphics cursor
x=Xgr
y=Ygr

Use these functions to find the current coordinates of the graphics cursor, which is the default location for future drawing operations. For example:

E> Cls : Circle 100,100,50
   Print Xgr,Ygr

Drawing lines

DRAW
instruction: draw a line
Draw x1 ,y1 To x2,y2
Draw To x,y

Line drawing is extremely simple. Pick two sets of graphic coordinates, and draw your line from one to the other. To draw a line from the current position of the graphics cursor, use DRAW TO followed by a single set of coordinates. For example:

E> Cls: Ink 2
   Draw 50,50 To 250,150
   Draw To 275,175

Line styles
Changing the appearance of straight lines is very simple with AMOS Professional. Each line pattern is held in the form of a binary number made up of 16 bits, with zeros setting blank spaces in the current background colour, and ones setting the solid parts of the pattern in the current ink colour. So a normal solid line can be imagined as having all its bits set to one, like this:

%01111111111111111
Back    Next
06.04.02