next up previous contents index
Next: Other Controls Up: Device Control Previous: Changing the Window Style   Contents   Index


Hard Copy and File Control

Calling Sequences
...

 
eps (name) 
hcp () 
hcp_file ([filename] [, dump = 0/1]) 
filename = hcp_finish ([n]) 
hcp_out ([n] [, keep = 0/ 1]) 
hcpon () 
hcpoff ()

Descriptions
...

eps(name)
Write the picture in the current graphics window to the Encapsulated PostScript file name + .epsi (i. e., the suffix .epsi is added to name). The eps function requires the ps2epsi utility which comes with the project GNU Ghostscript program. Any hardcopy file associated with the current window is first closed, but the default hardcopy file is unaffected. As a side effect, legends are turned off and color table dumping is turned on for the current window. The environment variable PS2EPSI_FORMAT contains the format for the command to start the ps2epsi program.

hcp()
The hcp function sends the picture displayed in the current graphics window to the hardcopy file. (The name of the default hardcopy file can be specified using hcp_file; each individual graphics window may have its own hardcopy file as specified by the window function.)

hcp_file([filename] [,dump=0/1])

Sets the default hardcopy file to filename. If filename ends with .ps, the file will be a PostScript file, otherwise it will be a binary CGM file. By default, the hardcopy file name will be Aa00.cgm, or Ab00.cgm if that exists, or Ac00.cgm if both exist, and so on. The default hardcopy file gets hardcopy from all graphics windows which do not have their own specific hardcopy file (see the window function). If the dump keyword is present and nonzero, then the current palette will be dumped at the beginning of each frame of the default hardcopy file. This is what you want to do when you want color plots. With dump = 0, the default behavior of converting all colors to a gray scale is restored.

filename=hcp_finish([n])
Close the current hardcopy file and return the filename. If n is specified, close the hcp file associated with window n and return its name; use hcp_finish(-1) to close the default hardcopy file.

hcp_out([n] [,keep=0/1])
**** NOT YET IMPLEMENTED **** Finishes the current hardcopy file and sends it to the printer. If n is specified, prints the hcp file associated with window n; use hcp_out(-1) to print the default hardcopy file. Unless the keep keyword is supplied and nonzero, the file will be deleted after it is processed by gist and sent to lpr.

hcpon()
The hcpon function causes every fma (frame advance) function call to do an implicit hcp, so that every frame is sent to the hardcopy file.

hcpoff()
The hcpoff command reverts to the default ``demand only'' mode.


next up previous contents index
Next: Other Controls Up: Device Control Previous: Changing the Window Style   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19