graphic figures and gtk and gtkprint
- From: Dan McMahill <mcmahill mtl mit edu>
- To: gtk-app-devel-list gnome org
- Subject: graphic figures and gtk and gtkprint
- Date: Thu, 15 Jan 2009 01:26:59 -0500
Hello,
I have a gtk app I wrote about 12 years ago. I've slowly evolved it. I
have about a dozen figures (graphics) that get displayed in some of the
dialogs. Two examples of these figures can be seen at
http://wcalc.sf.net/tech.html
The figures are drawn with tgif (a nice 2-d vector drawing program) and
then I export several formats from that:
- png for display on the web page I listed as well as for a CGI version
of wcalc.
- xpm for displaying in some of my gtk dialogs (see a screen shot at
http://www.sf.net/gtk-wcalc.html
- eps for printing.
Currently my printing is done via a custom dialog box and it works by
sending postscript code (generated by my code but it includes the eps
versions of my graphics) to a file or to a program like lpr. This is a
hold over from the fact that wcalc was written originally for gtk-1.x
Now that gtkprint is available I want to convert over so I can have
better cross-platform printing support.
I'm totally new to cairo and pango but have managed to get the basics
working. The problem is the figures. I've tried loading my png files
and rendering them with cairo. The problem is that the bitmap version
just doesn't look that hot (especially the text) when printed.
Especially when compared to the postscript version.
Does anyone have suggestions for the right way to deal with these
graphics? I still need png for the web pages, probably xpm for my gtk
dialogs and some vector format for printing. I understand there is a
way with SVG to get the printing but I can't seem to get my figures into
SVG short of re-drawing them in some other tool (inkscape maybe?).
Programming the figures in cairo would make them pretty and I guess
those could go directly in the gtk forms and cairo could produce png's
but the thought of of recreating a dozen or so figures like this with
cairo code sounds a bit painful.
At this point I'm a little unsure of the direction I should take. Any
thoughts?
Thanks and sorry for a somewhat long question.
-Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]