Export GTK-Plot to PNG, without showing



Hello,

I have an application which uses GTK-Plot in following manner:

canvas = gtk_plot_canvas_new()
my_plot = gtk_plot_new_with_size()
child = gtk_plot_canvas_plot_new(my_plot)
gtk_plot_canvas_put_child(canvas,child)

however,

I can capture the visible plot with gdk_pixbuf_get_from_drawable from the canvas and convert it to a PNG-Image.

But now I want to export the plot without showing it before.
The Plot should be just created for this export with some special options and is destroyed afterwards.

I am a little bit confused about canvas, gtk-plot-canvas, pixbufs, pixmaps, drawables, what is shown and when something is rendered.

Can I create a gdk-pixbuf and using the gtk-plot functions to draw directly into it?

I read something about gdk-pixmap, but I don't know how I can tell the gtk-plot functions to uses this as canvas.

Any other Ideas?

regards
  Arne



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