.\" @(#)hardcopy	1.7	12/10/92
.H1 "Hardcopy"
.pp
The user has several options for printing graphs and schematics
developed under \*(PT.
.IE hardcopy
The first option generates a postscript description and routes it
.IE postscript
to a printer. The second uses the screen capture capability
of the X window system.
.H2 "Printing Oct Facets"
.pp
A block diagram under pigi is stored as an Oct facet.
To print it to a postscript printer, 
first save the facet.  Do this by moving the mouse to the 
facet and press the "S" key to save.
.IE "saving facets"
Then, keeping the mouse in the facet, 
.IE "printing facets"
invoke the "print facet" command from the "Other" pigi menu.
You must have the environment variable PRINTER set to point to
a valid postscript printer. You can do this by putting the following
line in your .cshrc file:
.(c
	setenv PRINTER \fIprintername\fP
.)c
You will have to restart pigi for this change to be registered.
.pp
Upon running the print facet command under pigi,
a dialog box appears into which options may be entered.
The following options may prove useful:
.TS
l lw(5i).
-p	T{
Print in portrait mode, scaling to fit on the page or in the box
defined by the -b option.
T}
-l	T{
Print in landscape mode, scaling to fit on the page or in the
box defined by the -b option.
T}
-a	T{
Choose -l or -p, which ever gives the biggest plot (default).
T}
-b	T{
Give width and height to fit the plot in (in inches, defaults to the
full page).  For example, to get an image within a square five
inches on a side, use "-b 5x5".
T}
-s	T{
Multiply the scale determined by -a, -l, or -p by `scale'
(defaults to 1.0).
T}
-o	T{
Additional offset (in inches).
T}
-x	T{
Print labels.
T}
-X	T{
Used with `-x', only draw labels that fit in the bounding box
of the label.
T}
-A	T{
Do not print anything that is smaller then `abs' points (there
are 72 points per inch)
T}
-C	T{
Generate code for color postscript printers.
T}
-n	T{
Print the names of the terminals on icons.
T}
-P	T{
Replace the standard PostScript prologue file with `prologue'.
T}
-F	T{
Change the font and size (defaults to Times-Bold/7).
T}
.TE
.H2 "Capturing a Screen Image"
.pp
Under the X window system and compatible systems
there are facilities for capturing screen images.
.IE "screen dumps"
.IE "printing the screen"
.IE "color printers"
These can be used directly with \*(PT.
However, colors that work well on the screen are not always ideal
for hardcopy.  For this reason, two sets of alternative colors
have been devised.  The default works well with color printers.
The second works well with black and white printers.
For black and white printers, set the PIGIBW environment variable
before running pigi, as in:
.(c
setenv PIGIBW
pigi
.)c
.IE "PIGIBW"
Now, the screen capture command can be used effectively.
For example, under X11R4 or X11R5, 
the following command will print a window on a
black and white postscript printer:
.(c
xwd | xpr -width 4 -portrait -device ps -gray 4 | lpr
.)c
.IE xwd
.IE xpr
.IE postscript
Other alternatives include a program called xgrabsc.
.IE xgrabsc
A simple use of this is to generate an encapsulated postscript
image using the following command
.(c
xgrabsc -eps -page 4x2 -o mySchematic.ps
.)c
where mySchematic.ps is the name of the file into which you would
like to store the EPS image.
Then with the left mouse button, draw a box around the desired portion
of the screen. This command will then save an encapsulated postscript
file four inches by two inches called mySchematic.ps.
This file can then be used an a wide variety of document processing
systems.  For example,
to include this postcript in a TeX document, include the command
.IE TeX
.(c
\\\\include{psfig}
.)c
in the TeX file and use the commands
.(c
begin{figure}
  \\\\centerline{
  \\\\psfig{figure=mySchematic.ps,width=4in,height=2in}}
  \\\\caption{Ptolemy Schematic}
\\\\end{figure}
.)c
to display the postscript as a figure within a document.
.pp
The document processing system FrameMaker has built-in facilities to capture
a region of the screen and import it into a document.
.IE FrameMaker
FrameMaker can also import and print ordinary color X window dumps.
To have these displayed in color on the screen, the following lines
should appear in your X Resources file:
.(c
Maker.colorImages:      True
Maker.colorDocs:        True
.)c
The FrameMaker utility "fmcolor" can be used to reduce a color window
dump to a black and white window dump.  This will save space and avoid
any dithered imitations of color.
The color window dumps gotten with PIGICP set can be converted to black
and white window dumps using the following FrameMaker command:
.(c
fmcolor -i 90 filein fileout
.)c
A useful hint when using such a document editor is to turn off the
lables in pigi before capturing the image, and then to use the document
editor itself to annotate the image.  The fonts then will be printer fonts
rather than screen fonts.  To turn off the labels, execute the Vem
command "layer-display" under the Vem "Options" menu.
FrameMaker can also, in principle, import postscript files generated
in the process of executing the ``print facet'' command.
However, the results are not usually satisfactory, so this method
is discouraged.
.pp
To restore normal color, simply exit pigi, and unset the environment variable:
.(c
unsetenv PIGIBW
.)c
Next time you run pigi, it will have whatever colors you originally
specified in your X resources file, or if none, the default colors.
