home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: GXcopy and GXxor
- Message-ID: <1992Jul30.000839.5722@thunder.mcrcim.mcgill.edu>
- Keywords: GXcopy and GXxor
- Organization: McGill Research Centre for Intelligent Machines
- References: <xia.711911424@odin>
- Date: Thu, 30 Jul 92 00:08:39 GMT
- Lines: 25
-
- In article <xia.711911424@odin>, xia@molbio.ethz.ch (Xia Tai-he) writes:
-
- > I have created a GC with function GXcopy and another GC with GXxor
- > for drawing rubber-band lines,
-
- > I also set the foreground colors for the two GCs.
-
- What did you set them to? Getting the foreground pixel value wrong is
- the commonest problem with GXxor.
-
- > However, the lines drawn with the second GC don't have the color I
- > have set, whose colors differ depending on the objects alreay
- > existing on the screen.
-
- That's the way GXxor works: it XORs the foreground value in the GC with
- the value that's already there. It's up to you to make sure that the
- result is what you want. (XOR is useful for rubber-band lines because
- it's easy to invert - it's self-inverse. But of necessity, this means
- that different pixel values underneath the rubber-band end up being
- different pixel values when rubber-banded over.)
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-