Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!cory.Berkeley.EDU!dheller From: dheller@cory.Berkeley.EDU (Dan Heller) Newsgroups: comp.windows.x Subject: Re: XGetImage from an unmapped Window - how to? Summary: XCreatPixmap, XGetImage Message-ID: <4086@pasteur.Berkeley.Edu> Date: 25 Jun 88 19:01:29 GMT References: <154@cyclopes.UUCP> Sender: news@pasteur.Berkeley.Edu Reply-To: dheller@cory.Berkeley.EDU.UUCP (Dan Heller) Organization: University of California, Berkeley Lines: 22 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