Polylines
A polyline may be displayed using the 'POLYLINE' mnemonic. This mnemonic accepts up to 16 integer values for immediate data or a single integer argument indicating the number of integers to follow in the data stream. The cursor is MOVEed to the first pair and a 'DRAW' is executed for each additional coordinate pair.
Examples
1040 PRINT (2)'POLYLINE'(100,100,100,200,200,
1040:200,200,100)
or:
1040 PRINT (2)'POLYLINE'(8),100,100,100,200,
1040:200,200,200,100
or if the array X contains the defined data:
1040 PRINT (2)'POLYLINE'(8),X[ALL]
If your data is contained in binary strings, you may send it to the plot driver in that form using the following format:
1040 PRINT (2)'POLYLINE'(8,"S")STRING$
This form assumes that the string contains pairs of 16 bit two's complement X and Y values in order. See BIN() and DEC() in the Commands Manual.
The line is drawn using the current style and color. The cursor is left at the final pair of coordinates.
Rectangles
A rectangle may be drawn using the 'RECT' mnemonic. 'RECT'(x0,y0,x1,y1) will place a rectangle on the plotting surface with the lower-left corner described by x0,y0 and the upper-right corner described by x1,y1. Rectangles are considered solid shapes and may be filled. The cursor is left at the x0,y0 coordinates.
Polygons
A polygon is an arbitrary shape described by a number of points enclosing a number of areas. The mnemonic 'POLYGON' accepts the same arguments as the 'POLYLINE' mnemonic with the following addition: if the last pair of points is not the same as the first pair of points, PRO/5 adds one more pair to close the object. The object is then plotted onto the plotting surface.
All lines drawn are in the current style and color. If a fill type is chosen, the area enclosed by the polygon is filled in the current fill pattern.
Circles and Arcs
Circles and parts of circles (arcs) may be generated using the 'ARC' mnemonic. The 'ARC' mnemonic uses the following syntax:
'ARC'(x,y,radius{,aspect{,startpos,endpos{,pieflag}}})
Argument |
Description |
x,y |
Center point for the circle/arc |
radius |
Radius of the circle |
aspect |
The circle aspect ratio. If the aspect ratio is greater than 1, the circle will be compressed on the Y axis (the radius on the X axis). If the aspect ratio is less than one, the X axis will be compressed and the radius will refer to the Y axis. |
startpos |
Starting point of the arc (in radians) |
endpos |
Ending point of the arc (in radians) |
pieflag |
Argument indicating arc endpoints are to be connected to the center of the arc. Handy in plotting 'pie' charts. |
If the aspect is not described or is 0 or less, the circle is plotted in the current device aspect ratio; otherwise, the new aspect value is used. These may be used to print circles smashed into ellipses.
If startpos and endpos are described, the circle will become a piece of a circle, i.e., an arc. An arc is described in the normal manner with the starting position and ending position passed in radians.
If pieflag is used, the endpoints of the arc will be connected to the center of the circle to plot a pie slice. If pieflag is not used and a fill type is set, you will get a filled arc.
The circle, arc, and pie will be plotted using the current style and color. In addition, the current fill type will be taken into account in the plotting.