Plot Viewports

The 'VIEWPORT' mnemonic may be used to restrict the plotting surface to a subsection of the current display area. 'VIEWPORT'(x0,y0,x1,y1) places this viewing area to the region specified with x0,y0 at the lower left and x1,y1 at the upper right. Any plotting attempted outside this area will be 'clipped' (not plotted).

Device Aspect Ratio

The second consideration applies only to raster devices and is called the device aspect ratio. The device aspect ratio is the relative dot pitch on the X and Y coordinate systems. The aspect ratio for vector plotters is always 1 to 1. The aspect ratio may be modified using the 'ASPECT' mnemonic. The following table summarizes the various functions that the argument provides:

Argument

Description

arg< 0

Applies the specified aspect ratio to the device shrinking the longer of the two axes until the longer axis is fully on the screen.

arg= 0

Applies the default aspect ratio.

arg> 0

Applies the specified aspect ratio to the device stretching the shorter of the two axes 'off' the screen.

arg= 1

Removes any attempt by PRO/5 to correct for non-square plotting surfaces.

Once the world coordinate system and device aspect ratio have been selected, you will need to find out exactly what capabilities are available from the plotting device. This information may be obtained from the FIN() function.

Plotting In Color

You may plot in any of the colors supported by the plotting device. The mnemonics used to define the colors are 'COLOR' and 'PALETTE'. The 'COLOR' mnemonic may be used to select any color up to the number of colors supported by the device (this value is returned in the FIN() of the device). On a raster device, the color 0 is the normal background color; on a vector device, the paper itself is the background color.

On a raster device the 'PALETTE' mnemonic may be used to select various combinations of colors on the display hardware. If this is the case, the specific documentation for the supported hardware will specify the particular parameter combinations.

Line Styles

Various styles of lines may be plotted using the 'PATTERN' mnemonic. This mnemonic is given an integer argument in the range 0..9 where:

Value

Description

0

Solid line

1..3

Wide to thin dashes

4..6

Wide to thin dots

7..9

Wide to thin dash-dot

Shape Filling

You may have PRO/5 automatically fill solid shapes with the current line pattern and color by using the 'FILL' mnemonic. This mnemonic accepts an integer argument to select various fill types:

Value

Description

0

No filling

1

Solid filling

2

Single horizontal

3

Single vertical

4

Left top to right bottom (60 degree)

5

Right top to left bottom (60 degree)

6

Left top to right bottom (30 degree)

7

Right top to left bottom (30 degree)

8

Hash - horizontal and vertical

9

Hash - 60 degree

10

Hash - 30 degree

A quick method of disabling the filling of shapes is to use the 'NOFILL' mnemonic.