Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!ogicse!cs.uoregon.edu!allenb From: allenb@cs.uoregon.edu (Allen F. Brookes) Newsgroups: comp.sys.mac.programmer Subject: copybits Message-ID: <1990Aug22.220631.23010@cs.uoregon.edu> Date: 22 Aug 90 22:06:31 GMT References: <2054@key.COM> <3947@husc6.harvard.edu> <2070@key.COM> Sender: usenet@cs.uoregon.edu (Netnews Owner) Followup-To: allenb@cs.uoregon.edu Organization: Department of Computer Science, University of Oregon Lines: 23 Does anyone know how copybits really works? I thought I knew but in certain situations it does not behave the way I think it should. My understanding is that it gets the rgb value from the clut of the source pixmap, looks up the corresponding index in the current device inverse table and then deposits the value in the destination pixmap. This is the way it behaves when I am copying from the screen to an offscreen pixmap. When I copy the same image from the offscreen pixmap to a window on another device it seems to copy without the color translation. It seems as though the pixel values are transfered directly without the index -> rgb -> index translation. The only other possibility I can think of is that it is using the devices clut instead of the clut for the source pixmap. Another weird behavior is that when I copybits from the screen to the offscreen pixmap and back it works fine. However, when I copy from the screen to a window on another device it uses the other device as the source too. The base addr of my window is the same as the other device but in all other cases it uses the correct window. If anyone can help me understand what is happening I would appreciate it. Thanks, Allen