JustBeginer
Programmer
- Mar 13, 2003
- 39
Hi Friends,
I've wrote a simple program for 3D graphic.
I want to take a screenshot of the window where my objects are shown.I've tried to do that, but...
I take the screenshot from the upper left corner on the main screen.
Thanks a lot for the heplp in advance.
//--------------------------------------------------
void save_snap (){
GdkDrawable *root;
GdkWindow *parent;
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL, 0,0 0, 0, (GLint)area->allocation.width,(GLint)area->allocation.height);
//save to file ...
}
//--------------------------------------------------
I've wrote a simple program for 3D graphic.
I want to take a screenshot of the window where my objects are shown.I've tried to do that, but...
I take the screenshot from the upper left corner on the main screen.
Thanks a lot for the heplp in advance.
//--------------------------------------------------
void save_snap (){
GdkDrawable *root;
GdkWindow *parent;
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL, 0,0 0, 0, (GLint)area->allocation.width,(GLint)area->allocation.height);
//save to file ...
}
//--------------------------------------------------