Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!decwrl!decwrl!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: Combining Two drawables (Pixmaps) Message-ID: <4589@bacchus.dec.com> Date: 30 May 90 00:33:15 GMT References: <436@hal.CSS.GOV> Sender: news@decwrl.dec.com Reply-To: klee@wsl.dec.com Organization: DEC Western Software Laboratory Lines: 17 In article <436@hal.CSS.GOV>, nancie@hal.CSS.GOV (Nancie Matson) writes: > Is it possible to XOR two Pixmaps and still retain the colors? This is a fairly common graphics problem. Simple binary logic functions like XOR are not usually appropriate when dealing with multi-bit color pixel values. A little arithmetic with your pixels will show you why. There are 2 ways to work around this. First, you can use images and whatever logic you want to combine pixels. Second, you can prepare your colormap so that the logic functions give you the results you want. The second technique is much faster and is commonly used with CAD applications. Any good computer graphics text should have examples of such colormaps. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee