Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!vsi1!apple!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler) Newsgroups: comp.windows.x Subject: Re: Help needed with GC's Message-ID: <8901141509.AA05645@EXPIRE.LCS.MIT.EDU> Date: 14 Jan 89 15:09:33 GMT References: <8937@burdvax.PRC.Unisys.COM> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 10 What I want to know is what is quickest way to swap the foreground and background pixels of a given rectangle that works on both monochrome and color monitors? When only two pixel values are involved, A and B, you can either set the function to GXinvert and the plane mask to (A xor B) and the foreground to all ones, or you can set the function to GXxor and the foreground to (A xor B) and the plane mask to all ones. Which one is faster will probably depend on the server.