Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: pixels -> Pixmap Message-ID: <8905261203.AA01460@expire.lcs.mit.edu> Date: 26 May 89 12:03:17 GMT References: <3630004@hpindda.HP.COM> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 13 You probably want to get the data into an XImage structure. Then you can either XPutImage (parts of) it directly into a window each time you need it, or you can XPutImage it into a pixmap and then XCopyArea out of that when you need to. The XImage interface is, uh, broken (to be polite). After you call XCreateImage, you may have to manually frob some structure components, depending on exactly what your data format is. Read through Section 10.9 of the Xlib manual. You can either try to create an image with the "natural" format of your array, or you can create an image and then use XPutPixel to fill it. If your image format doesn't match the server's, there will be a conversion cost paid in each XPutImage. Which route is better depends on how many times you expect to call XPutImage.