stergios@athsys.uucp (Stergios Marinopoulos) (06/24/88)
Is there a way to XGetImage from an unmapped window? The man page states "If the drawable is a window, the window must be mapped, ...." My motivation is this: create an unmapped window, render stuff into it, store that image, delete the window, and flash the image back some time later through the use of XPutImage. thanks, sm. p.s. anybody have the offical fixes for the c++ include files?
rfrench@athena.mit.edu (Robert S. French) (06/25/88)
In article <154@cyclopes.UUCP> stergios@cyclopes.UUCP (Stergios Marinopoulos) writes: >Is there a way to XGetImage from an unmapped window? The man page >states "If the drawable is a window, the window must be mapped, ...." > >My motivation is this: create an unmapped window, render stuff into >it, store that image, delete the window, and flash the image back some >time later through the use of XPutImage. Since a Pixmap is also a Drawable, doesn't it seem easier to create a Pixmap and render into _it_ directly, thus bypassing the Window/XGetImage route? Rob
dheller@cory.Berkeley.EDU (Dan Heller) (06/26/88)
In article <154@cyclopes.UUCP> stergios@cyclopes.UUCP (Stergios Marinopoulos) writes:
Is there a way to XGetImage from an unmapped window? The man page
states "If the drawable is a window, the window must be mapped, ...."
My motivation is this: create an unmapped window, render stuff into
it, store that image, delete the window, and flash the image back some
time later through the use of XPutImage.
Don't create a window -- create a pixmap. Since it is a drawable, you can
create a pixmap (it isn't mapped to the screen), draw into it, then use
the image from the pixmap.
Note; I'm not sure of args here cuz I don't have any xcode handy at the moment.
Pixmap pix = XCreatePixmap(dpy, rootwin, size, etc...)
XImage *image;
XDrawLine(dpy, pix, gc, ...
image = XGetImage(dpy, pix, ...
XDestroyPixmap(pix);
Dan Heller <island!argv@sun.com>