home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14379 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.1 KB

  1. Path: sparky!uunet!sun-barr!apple!apple!netcomsv!dlb!shawn!root
  2. From: root@shawn.uucp (Mark Jeghers -- UNIX/X/Motif Contractor)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: GXcopy and GXxor
  5. Keywords: GXcopy and GXxor
  6. Message-ID: <1992Jul25.030011.3417@shawn.uucp>
  7. Date: 25 Jul 92 03:00:11 GMT
  8. References: <xia.711911424@odin>
  9. Organization: Mark Jeghers -- UNIX/X/Motif Contractor
  10. Lines: 23
  11.  
  12. xia@molbio.ethz.ch (Xia Tai-he) writes:
  13.  
  14. >However, the lines drawn with the second GC [ GXxor ] don't have
  15. >the color I have set, whose colors differ depending on the
  16. >objects alreay existing on the screen.
  17.  
  18. The best you can do is this: 
  19.  
  20. 1) Determine the *dominant* background color the rubberband will
  21.    be drawn on top of (the color taking up the largest percent of
  22.    your rubberbanding area)
  23.  
  24. 2) Exclusive-OR that *dominant* background color's pixel value with
  25.    the pixel value of your desired rubberband color.
  26.  
  27. 3) The resulting value is the foreground pixel value to use in the 
  28.    second GC.
  29.  
  30. The color will be correct except when moving over *other* colors.
  31.  
  32. Mark Jeghers
  33. UNIX/X/Motif Contractor
  34. 408/281-4823 [voicemail]
  35.