Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!decwrl!deccrl!bloom-beacon!bloom-picayune.mit.edu!athena.mit.edu!shanega From: shanega@athena.mit.edu (Shane G. Artis) Newsgroups: comp.sys.next Subject: Software Development Summary: BitmapImageRep can't capture off screen Message-ID: <1991May22.224125.25693@athena.mit.edu> Date: 22 May 91 22:41:25 GMT Sender: shanega@athena.mit.edu Distribution: comp.sys.next Organization: Massachusetts Institute of Technology Lines: 41 Hi. I am having some appkit programming difficulties. Does anyone have a good answer for this one? I am having a problem using a NXBitmapImageRep object to capture portions of an already drawn View. What I do is use a code fragment such as: tempbm = [[NXBitmapImageRep alloc] initData:tempdata fromRect:&aRect]; tempimage = [[NXImage alloc] initSize:&aRect.size]; [tempimage useRepresentation:tempbm]; to capture a rectangle from inside a window into a NXBitmapImageRep object, and hence to an NXImage object. Later in the code I redraw this image using: [tempimage composite:NX_COPY toPoint:&aPoint]; This procedure worked fine. Unfortunately, eventually I had the window that contained the View partially off-screen, and when I went to capture an image that was completely off-screen I got a message from the window server: Inconsistent set of values to create NXBitmapImageRep This was all that was printed, and when the code went to redraw the image no image was drawn. If the captured image is partially on-screen then the image appears to get redrawn to the wrong location. I need to study this a little more to find out the correlation between partially off-screen image capture and incorrect redrawing. Does anyone know of a reasonable solution to this problem? It doesn't seem to me that when using a Buffered window that NXBitmapImageRep should care whether I am drawing partially off-screen or not. Thanks, Shane