home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!apple!apple!netcomsv!dlb!shawn!root
- From: root@shawn.uucp (Mark Jeghers -- UNIX/X/Motif Contractor)
- Newsgroups: comp.windows.x
- Subject: Re: GXcopy and GXxor
- Keywords: GXcopy and GXxor
- Message-ID: <1992Jul25.030011.3417@shawn.uucp>
- Date: 25 Jul 92 03:00:11 GMT
- References: <xia.711911424@odin>
- Organization: Mark Jeghers -- UNIX/X/Motif Contractor
- Lines: 23
-
- xia@molbio.ethz.ch (Xia Tai-he) writes:
-
- >However, the lines drawn with the second GC [ GXxor ] don't have
- >the color I have set, whose colors differ depending on the
- >objects alreay existing on the screen.
-
- The best you can do is this:
-
- 1) Determine the *dominant* background color the rubberband will
- be drawn on top of (the color taking up the largest percent of
- your rubberbanding area)
-
- 2) Exclusive-OR that *dominant* background color's pixel value with
- the pixel value of your desired rubberband color.
-
- 3) The resulting value is the foreground pixel value to use in the
- second GC.
-
- The color will be correct except when moving over *other* colors.
-
- Mark Jeghers
- UNIX/X/Motif Contractor
- 408/281-4823 [voicemail]
-