		       Changing Graphics Devices

		       Last updated: 15 June 1994


Note: The routines previously named X and SUN were renamed to XWIN and
      SUNVIEW respectively.

These routines form the part of the SERTS subroutine library pertaining
to switching back and forth between graphics devices.  The philosophy
behind these routines is to be able to switch from one device to
another, and to be in the same state as when last using that device.
That way one could be working in both Tektronix and PostScript modes,
switching back and forth between them making plots and overplots, and
everything would work.  One could also be using hardware fonts in one
and software fonts in the other.

The routines used to switch between modes are:

	TEK		- Tektronix 4000 series terminal
	TEKxxxx		- Tektronix 4100 series (or above) terminal
	REGIS		- Regis terminal
	PS		- PostScript plot file
	QMS		- QMS plot file
	PCL		- HP LaserJet (PCL) plot file
	SUNVIEW		- SunView
	XWIN		- X-windows display or terminal
	WIN		- Microsoft Windows display

These routines will only work if used exclusively to change the plotting
device.  Internally they use the routine SETPLOT, but this would not
normally be used directly.

One can also place multiple plots on the same screen, and switch between
them, using the routine SETVIEW.  When switching between graphics
devices, the view must be defined separately for each graphics device,
but the view will be preserved when switching back and forth.  Using
SETWINDOW instead of WSET will also allow the view and the plotting
parameters to be preserved when switching between windows.

SETSCALE can be used to force the same scale to be used for both the X
and Y plot axes.  Currently, it is recommended that one calls SETSCALE
to set the scale, generates the plot, and then calls SETSCALE again to
reset the system variables to the values they had before the scale was
set.  The routines SETPLOT, SETWINDOW, and SETVIEW will automatically
reset SETSCALE.  Even after disabling the SETSCALE parameters,
additional graphics functions such as OPLOT will still be possible.

The routines devoted to PostScript, i.e. PS, PSCLOSE, and PSPLOT, are
also designed to work together.  Only these routines should be used to
control the format and state of the PostScript file.  If the optional
QMS device driver is present, then these comments also apply to QMS,
QMCLOSE and QMPLOT.  The same goes for the PCL routines.

The routines PSPLOT and QMPLOT make reference to a specific printer queue
called SOLAR$TALARIS (and perhaps others).  This refers to a printer at our
site which requires a special command to print QMS or PostScript files.  These
references can be safely ignored, deleted, or used as a model for other
printers who require nonstandard print statements.

These routines also use the special system variables !BCOLOR and !ASPECT.
These system variables are defined in the procedure DEVICELIB.  It is
suggested that the command DEVICELIB be placed in the user's IDL_STARTUP
file.

Questions should be directed to:

	PAL::THOMPSON				(SPAN)
	William.T.Thompson.1@gsfc.nasa.gov	(Internet)

-----------------------------------------------------------------------------

Files as of 15-Jun-94

 
Directory:  /cs/test/util/device/
 
DEVICELIB         - Definitions needed for the SERTS graphics device library.
GET_VIEWPORT      - Gets current viewport values, in device coordinates.
HAVE_WIDGETS      - Tests whether current graphics device supports widgets.
HAVE_WINDOWS      - Tests whether current graphics device supports windows.
PCL               - Sets graphics device to HP LaserJet PCL file.
PCLCLOSE          - Close an HP LaserJet PCL plot file, reset graphics device.
PCLPLOT           - Print an HP LaserJet PCL plot file, reset graphics device.
PS                - Sets graphics device to PostScript file.
PS_LONG           - To stretch plotting area when device is PostScript printer.
PS_RESET          - Resets PostScript plotting area to Portrait, normal size.
PSCLOSE           - Close a PostScript plot file, reset graphics device.
PSPLOT            - Prints PostScript plots and resets to the previous device.
QMCLOSE           - Close a QMS plot file and reset the graphics device.
QMPLOT            - Print a QMS plot file and reset the graphics device.
QMS               - Sets graphics device to QMS Quikplot file.
REGIS             - Sets graphics device to REGIS mode.
RESET             - Resets system variables to their default values.
SETPLOT           - Switch between plotting devices with memory about each.
SETSCALE          - Sets plot scale so it is the same in X and Y directions.
SETVIEW           - Switch between several plots on one page.
SETWINDOW         - Switch between windows, retaining parameters for each.
SHOW_QUEUE        - Show the contents of a print queue.
SUNVIEW           - Switch to SunView mode.
TEK               - Sets graphics device to Tektronix 4010 mode.
TEK4105           - Sets the graphics device for Tektronix 4105 terminals.
TEK4211           - Sets graphics device for Tektronix 4211 color terminal.
TEKMONO           - Sets graphics device for Tek 4100+ terminals, mono mode.
WIN               - Switch to Microsoft Windows mode.
XWIN              - Switch to X-windows mode.
