[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: postscript output
From: |
Nelson Minar |
Subject: |
Re: postscript output |
Date: |
Tue, 13 Feb 96 15:43:02 MST |
> 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.
As Martin said, BLTGraph and Histo both can output postscript directly.
The basic command in Tcl is "widget postscript filename", lots of
detail in the blt_graph man page (and the canvas man page docs
probably apply).
The tkobjc library Swarm uses doesn't support this directly. Code like
this will do the trick:
[globalTkInterp eval: "%s postscript output.ps", [aBLTGraph getWidgetName]]
This is a general problem with tkobjc: I can wrap up the most useful
functionality of the widgets (and add some along the way), but I don't
want to reproduce every possible Tcl command. So, at some level, we
make it possible for you to shell out to the Tcl interpreter directly.
There's no similar command for a Raster widget, though. Some sort of
screendump program (xwd is stock X11R6, xgrab is a nice program you
can get off the net somewhere) will do it for you. It would make sense
to have a "take a snapshot" option for the Raster widget that wrote
the data to a file in a format like GIF (PPM, most likely). Not sure
if/when this will happen. Recording data directly to a file is more
important right now.