WXP
Resource Reference

Resource: device

Resource device
Overview Specifies the output device.
Command Line -de=device[,parameters]
Environment Variable wxpdevice
Possible Values
Default Value d for display

This resource is used to specify the output device used for producing the plots. For general purposes, the output device can be specified by the single character listed with each of the output types. For example, the display is "d". Additional information may be required for specific output types. For example, the window device needs the window ID. The syntax for each device type is listed below:

Display

d[,Xserver:display]

For the display output, the only additional parameter is the server name which is not often needed. If not specified, the value of the DISPLAY environment variable is used.

Window

w,[Xserver:display],[+window_id:]pixmap_id[:widthxheight][:colormap_id]

As with the display device, the server ID may be specified, otherwise the value of the DISPLAY environment variable is used (X windows only). The window ID and pixmap ID follows along with its size if it is different from 640x512 (the default window size). An additional parameter for the colormap can be specified if the window creation program is using a local colormap (X windows only). The last three parameters are specified with a colon ":" in between each parameter.

There is a second method for specifying window parameters:

w,[Xserver:display],filename

This reads the window information "+window_id:pixmap_id[:widthxheight][:colormap_id]" from the specified file. This can simplify use of wxploop since there needs to be a way to communicate the window information to other programs. This is essential for Windows programs since the Win32 prevents output to standard output. The filename is created with the "wxploop -ba -wn=filename" command.

Postscript

p[,file][,parameters...]

The output file is wxp.ps unless otherwise specified. The output file can be one of the following:

File Description
file A specific output file
+file Output to a file in append mode. Header and trailing showpage are omitted. This allows for multiple program to overlay graphics. Once the full file has been generated, the pscat program can be used to put the header and trailer on the file and spool to the printer.
|program Pipes the output to a specific program. This is often used to spool the output to a print queue by using "|lp".

The parameters are (multiple parameters are separated by commas):

Parameter Description
port Portrait output
land Landscape output (default)
eps Encapsulated postscript
noeps Standard postscript output
color Setup for color output (colors automatically inverted)
gray Setup for grayscale output (default)
scale=factor Scale the output
lwidth=factor Base line width (def=1.0)
sz=widthxheight Set paper size in inches.
letter Letter paper size (8.5x11")
legal Legal paper size (8.5x14")
11x17 11x17" paper size
a4 A4 paper size (8.3x11.7")
a3 A3 paper size (11.7x16.5")
ansid ANSI D paper (22x34")

The output file and parameters can be set with the use of the wxpps_print environment variable. PSPRINT can be used for backward compatibility.

setenv wxpps_print postscript_file
setenv wxpps_print '|program'
setenv wxpps_print +filename

The above parameters can be specified with the wxpps_param environment variable:

setenv wxpps_param letter,color

HPGL

h[,file][,parameters...]

The output file is wxp.hpgl unless otherwise specified. The output file can be one of the following:

File Description
file A specific output file
+file Output to a file in append mode. Header and trailer are omitted. This allows for mulitple program to overlay graphics. Once the full file has been generated, the hpglcat program can be used to put the header and trailer on the file and spool to the printer.
|program Pipes the output to a specific program. This is often used to spool the output to a print queue by using "|lp".

The parameters are (multiple parameters are separated by commas):

Parameter Description
port Portrait output
land Landscape output (default)
pcl Includes PCL command to switch to HPGL (default)
lj Laserjet setup (rotates paper)
rot=angle Rotation angle
scale=factor Scale the output
lwidth=factor Base line width (def=0.2)
sz=widthxheight Set paper size in inches.
letter Letter paper size (8.5x11")
legal Legal paper size (8.5x14")
11x17 11x17" paper size
a4 A4 paper size (8.3x11.7")
a3 A3 paper size (11.7x16.5")
ansid ANSI D paper (22x34")

The output file and parameters can be set with the use of the wxphp_out environment variable.

setenv wxphp_out HPGL_file
setenv wxphp_out '|program'
setenv wxphp_out +filename

The above parameters can be specified with the wxphp_param environment variable:

setenv wxphp_param ansid,lwidth=.5

Metafile

m[,file]

The output file is wxp.meta unless otherwise specified. The output file can also be set with the wxpmeta_out environment variable.


Last updated January 2014