[cairo] PostScript Import / Watch File

Dirk Schönberger dirk.schoenberger at sz-online.de
Thu May 24 11:32:38 PDT 2007

> Since Cairo mirrors so many of the PostScript operators, is there a
library of some sort to import PostScript files and display them
> onscreen? I'm hoping to use Cairo and Gtk to make a WYSIWYG graph
editor --- visually plot data whilst taking it, arrange TeX-generated
> labels (which can be easily embedded into a figure via eps), and do some
annotation using simple PostScript/Cairo operators to draw and
> color lines. I already have a lot of the command line functionality to
generate PostScript graphs and embed TeX labels, but I would like to do it >
visually so one can use the mouse to arrange things rather than guessing at
coordinates in the raw PostScript. As far as I can tell, I can either > keep
recompiling a PostScript file and watch it with a gv-like widget (which I'd
need to write, god help me) or mirror the plot using Cairo and > use the
command line routines to generate PostScript at the end. I'd be grateful for
any suggestions.

I don't know of any Postscript import library, short of a full blown
Postscript interpreter like Ghostscript. Problem is that Postscript is in
reality a a full blown programming language.
What would be easier is to create a import library for a limited graphics
system, like PDF or the "Adobe Illustrator" format.

However, this is not really useful for Cairo, because Cairo is more of a
"direct rendering" system, ie. it doesn't contain any system to actually
hold the "imported" data.


More information about the cairo mailing list