Re: How to get image of offscreen widget or window ?



On 16/06/2004 11:01 PM, Grim S wrote:

I have a GTK window which is slightly offscreen - when
i used gdk_drawable_get_image() the offscreen portions
are black in color - is there an api/hack/anything
which will allow me to get to the drawing of
widget/window, or make the widget/window paint to a
different context?
Is there a defect for this problem ?
Any help would be greatly appreciated.
First of all, gtk-devel-list is a list for discussing the development of GTK. For questions like this about developing with GTK, you should use gtk-list or gtk-app-devel-list.

In X11, windows (unlike pixmaps) have no backing store. If they aren't on screen, or are obscured, then there is no contents to grab.

However, if you are using an X server that supports the composite extension (currently only the freedesktop.org X server), then it is possible to redirect a window hierarchy to render to a pixmap. This would allow you to grab the contents of the window, even if it isn't visible on the screen. It will take a while before you can rely on this sort of functionality though.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





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