Plotters - Overview

Any name in the ALIAS table starting with a 'D' is considered a graphics device. A system will typically support only one or two graphics devices; under DOS you would have the display and a printer supporting graphics commands; in a UNIX or XENIX system, typically you might have one display device and probably only one graphics capable printer. Each device might support various modes, each mode having different characteristics such as various combinations of colors and plotting resolution.

Under PRO/5, the plotter is considered to have a surface with X points horizontally and Y points vertically. X is considered to increase from left to right and Y to increase from bottom to top. A line may be drawn from any arbitrary set of points. Lines not in the current surface bounds will be clipped to the segment within the surface bounds.

Raster vs. Vector

The devices supported by PRO/5 may be either raster (typically a display) or vector (as in a plotter). There are some mnemonics that function on a raster device yet will not function on a vector device (as in the 'PAINT' mnemonic). In addition, a replacement operation will not work on a device using physical pens; you cannot overwrite already written data as you can on a raster display or printer. With this taken into consideration, all plotting mnemonics operate in a similar manner regardless of the plotter type being used.

Talking To a Graphics Device

The interface to a graphics device is very much like the interface to a terminal; all controlling operations are performed using mnemonics. Various mnemonics are used to set operating modes; others are used to set device parameters; and finally, some are used to actually display data on the device.

World Coordinate System

When using a graphics device, the first consideration is the coordinate system that you will be using. PRO/5 provides a world coordinate system that may extend from -32768..32767 along either the X or the Y axis. The X axis is considered to increase moving from the left to the right; the Y axis increases moving from the bottom to the top. The default world coordinate system is an X range from 0 to 1023 and a Y range from 0 to 1023. The default world coordinates may be modified using the 'WORLD'(x0,y0,x1,y1) mnemonic. The arguments are used to set the lower-left world corner described by the x0,y0 coordinate pair and the upper-right corner described by x1,y1.

Setting the world coordinates to any value approaching the maximum range could result in some unexpected lines appearing in the plotting area due to 'wrapping' of plot commands. These are caused most frequently by plotting text.