Question in using gdk_pixbuf_get_from_drawable()
- From: "ying lcs" <yinglcs gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Question in using gdk_pixbuf_get_from_drawable()
- Date: Tue, 18 Mar 2008 10:46:01 -0500
Hi,
I have a question of using gdk_pixbuf_get_from_drawable(). I have the
following code which save the gdk window to a png file.
But something I get something which is totally not what is displayed
on the window. Can you please tell me what am I missing?
GdkWindow *window ;
if (window != NULL) {
int x, y, width, height, depth;
gdk_window_get_geometry( window, &x, &y, &width, &height, &depth );
printf (" width=%d, height=%d\n", width, height);
/* copy the pixmap from the treeview and from the title */
pb = gdk_pixbuf_get_from_drawable(NULL,
GDK_DRAWABLE(window),
NULL, 0, 0, 0, 0, width, height);
/* save the pixbuf to a png file */
gdk_pixbuf_save(pb, filename, "png", NULL,
"compression", "9",
NULL);
}
Thank you.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]