Amos Professional Manual  Contents  Index

Graphics


BAR
instruction: draw a filled rectangle
Bar x1,y1 To x2,y2

This is used to draw solid bars of colour by the familiar method of setting the top left-hand and bottom right-hand graphic coordinates.

POLYGON
instruction: draw a filled polygon
Polygon x1,y1 To x2,y2 To x3,y3
Polygon To x1,y1, To x2,y2

This can be regarded as creating a solid version of the POLYLINE command, and your shape will begin at the current graphic coordinates if you commence the command in its POLYGON TO form. Provided that your single statement does not exceed the maximum allowed line length of 255 characters, there is no limit to the number of pairs of coordinates you can use. Try this example:

E> Do
    Ink Rnd(15)
    X1=Rnd(250) : Y1=Rnd(150) : H=Rnd(200) : W=Rnd(150)
    Polygon X1,Y1 To X1+W,Y1 To X1+W/2,Y1+H To X1,Y1
   Loop

Alternative fill style
Filling shapes with plain colours is a useful technique, but the AMOS Professional programmer has a much wider choice of fill effects.

SET PATTERN
instruction: select a fill pattern
Set Pattern number

Use this command to select from a range of pattern styles. The default status fills shapes with the current ink colour, and is set with a zero, like this:

X> Set Pattern 0

If SET PATTERN is followed by a positive number from 1 to 34, shapes are filled from a ready- made selection of patterns.

Back    Next
06.04.08