Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Q: how to add a print option to a graphics viewer?

3 views
Skip to first unread message

Pedro Nuno

unread,
Oct 10, 1996, 3:00:00 AM10/10/96
to

I am thinking of developing a project for a computational
physics course using Tcl/Tk. The project is 3D graphics viewer
for common problems such as the three body problem. My problem
is that I would like add a print option to the program (in Postscript).
The problem is I don't know how to program in Postscript.
I've thought of doing it in several ways, but I'd like to know if
they are viable:

1- Doing the graphics on a Pixmap (I don't mean a pixmap file, but
an X Windows drawable) and then displaying them on a canvas widget. Doing
so I could use the canvas widget postscript option. I think a canvas widget
can display pixmaps, but I only know it's possible to display pixmap files
on widgets, not pixmaps. Is it possible for a widget to display a pixmap,
by building my own interpreter in C?


2- Using the same routines the canvas widget uses for generating
postscript (this implies building my own widget). As far as I know all
of the functions used by widgets are available as C procedures.
Is it possible to use the same procedures the canvas widget uses in order
to create a Poscript file corresponding to the graphic?


3- This is a bit far fetched but here it goes: using some publicly
available library for doing graphics in Poscript, then building a new widget
using it's procedures. I've tried using plplot, but it won't compile on my
system (Slackware Linux 3.0, kernel 1.3.20). I can't waste time running
around trying to find a library I can compile.


I am very thankfull for all the help I can get.


0 new messages