swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: postscript output


From: Martin J. Maiers
Subject: Re: postscript output
Date: Tue, 13 Feb 1996 11:33:25 -0600 (CST)

Ginger Booth wrote
> 
> Dear gang,
> 
>     Is it easy to generate postscript (eps or ps) output from Swarm display
> windows?  I've got a son-of-BLTGraph, son-of-Histo, and son-of-Raster I'd
> like to plot out.


I believe BLTGraph and Histo are based off the Tk-Canvas
window which a has "postscript" command associated with it:

>From the Tk-canvas man page:

     pathName postscript ?option value option value ...?

          Generate a Postscript representation for part or all of
          the  canvas.  If the -file option is specified then the
          Postscript is written to a file and an empty string  is
          returned;   otherwise the Postscript is returned as the
          result of the command.  The Postscript  is  created  in
          Encapsulated  Postscript  form using version 3.0 of the
          Document Structuring Conventions.   The  option - value
          argument  pairs  provide additional information to con-
          trol  the  generation  of  Postscript.   The  following
          options are supported:

For example if you have a canvas called .g1, the TCL command:

   .g1 postscript file.ps -colormode mono

will generate a B/W postscript image of the graph and
put in a file called "file.ps".

--

If you just want take a snapshot, this script will
change your cursor to 'crosshairs' and any window you
click on will be captured an brought up in 'xv', which
can be used to rotate, scale, etc. then save the output 
as postscript.


--<begin>----8<------8<------
#!/bin/sh
#
# xdump - dump xwindow to xv
# 
TMPFILE=${TMPDIR:-/tmp}/xdump.$$
trap 'rm -f ${TMPFILE}; exit 1' 1 2 3 15
xwd |xwdtopnm >${TMPFILE}
xv ${TMPFILE}
rm -f ${TMPFILE}
exit 0
--<end>------8<------8<------


Martin
-- 
Martin Maiers, System Administrator             address@hidden
Advanced Biosciences Computing Center           (612) 624-7471
247 Gortner Labs, 1479 Gortner Ave              (612) 625-9284 (HelpLine)
St. Paul, MN 55108-1022                         (612) 625-5780 (FAX)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]