problems saving gdkpixbuf to png image
- From: Luka Napotnik <luka napotnik gmail com>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: problems saving gdkpixbuf to png image
- Date: Mon, 31 Mar 2008 20:42:51 +0200
Hello.
I have a custom widget from GtkDrawingArea and done some cairo drawing.
The custom widget is inside a ScrolledWindow because sometimes the whole
custom widget is not visible Now I tried to save the contents of that
widget to a PNG file. Here's the code:
----------------------
private = GTK_WHITEBOARD_GET_PRIVATE(whiteboard);
window = GTK_WIDGET(whiteboard)->window;
pixbuf = gdk_pixbuf_get_from_drawable(pixbuf, window, NULL,
12, 12,
0, 0,
private->width - 12, private->height - 12);
gdk_pixbuf_save (pixbuf, filename, "png", &error, NULL);
--------------------
I removed the error checking code (there are no errors).
The problem is when I execute the code and view the resulting PNG image,
only the visible part is saved. The part, hidden by scrolled window, is
not there. How can I save the whole GdkWindow?
Please help.
Greets,
Luka
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]