Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Have you used NewGDevice? Keywords: newGDevice, refNum, devices Message-ID: <28415@ucbvax.BERKELEY.EDU> Date: 16 Mar 89 06:59:09 GMT References: <1240@mmm.UUCP> <27131@cci632.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Distribution: usa Organization: School of Education, UC-Berkeley Lines: 9 Here is one case where I needed a GDevice: I had an arbitrary PICT that used only two colors, neither of them black or white, and I wanted to draw it with the colors reversed. Simple, I thought, I'd just render it to an offscreen pixmap, with a color table of only two entries, swap the entries, and CopyBits the offscreen pixmap to the screen. But noooo, CopyBits uses the inverse table of the current GDevice as an implicit parameter to figure out how to map the colors of the pixmap source to the pixmap destination. I needed to build a gdevice to get the rather peculiar color map I wanted. So, I did it. It works.