Path: utzoo!attcan!uunet!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Problem with GXxor Function??? Message-ID: <8909241859.AA01673@expire.lcs.mit.edu> Date: 24 Sep 89 18:59:24 GMT References: <521@wizard.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 12 What am I forgetting???? That not all pixel values are created equal. You haven't said what the foreground value in the GC is, or what the pixel values in the window are. My guess is that you've forgotten that WhitePixel and BlackPixel (or any other pixel, for that matter) can be arbitrary values, e.g. either one can be zero, and zero doesn't xor too well. If you have two pixel values F and B and you want xor to work, set the foreground value in the GC to (F^B). Try reading the color chapter in the O'Reilly books (or look at the excerpt in R3 in doc/tutorials).