keith@uw-apl.UUCP (Keith Kerr) (11/03/88)
The Problem: I am using Allegro Common Lisp on a Mac II with 8 bit color. I create an old type window (not a Cwindow), and I plot some data into it in various colors (by changing fgColor to one of the allowed colors in the old color model). I want to CopyBits the window's contents into an offscreen buffer, and then later CopyBits it back, still preserving the plot colors. My window uses a BitMap, so I made an offscreen BitMap and copied to it. Upon copying back, all color info was lost. I made a new offscreen Bitmap that was big enough for 8 bit color (multiplying rowbytes by 8) and tried that, but still no color. I then made an offscreen Pixmap, with size enough for an 8 bit image. I set the Pixmap.pixelsize to 8, and set the high bit in RowBytes. ( I read somewhere you had to do this so CopyBits would know it was a PixMap instead of a Bitmap). When I copied back to my window on the screen, again, all color info was lost and everything was in black. Can someone please tell me what I'm doing wrong, or point me to some literature that will describe this process in explicit detail??? My only other thought is that maybe I should make a Cgrafport offscreen and CopyBits into that, but I don't know why that should be necessary for what I want to do. Any Ideas??????