How can I save a GdkDrawable to an image file?

Hello folks,

I'm writing a program that draws some stuff (XY data plots from
laboratory measurement equipment) into a gtk drawing area. I'd
also like to be able to view these graphs over a Web interface,
so I need to export them as png file. In fact, I'd like to write
my little gdk-based graphics library such that it can be used
both interactively in an X application and also without any X
server running.

Essentially I want to avoid developing the code twice (once for
onscreen with Gdk, and for offscreen with --say-- libgd).

Here are my questions:

1) Does there already exist a library that renders numerical data
   to a GdkDrawable (a GdkWindow or GdkPixmap)?

2) Does Gdk need to have an X server running in order to draw to
   a GdkPixmap?

3) Is there a function that saves the contents of a GdkPixmap to
   some standard graphics format (GIF/TIFF/PNG)?

Thanks for any help,

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