home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 21003 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.5 KB  |  33 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!think.com!paperboy.osf.org!paperboy!drand
  3. From: drand@spinner.osf.org (Douglas S. Rand)
  4. Subject: Re: Colors and GXxor
  5. In-Reply-To: stephen@tangent1.UUCP's message of Fri, 8 Jan 1993 22:59:14 GMT
  6. Message-ID: <DRAND.93Jan11125916@spinner.osf.org>
  7. Sender: news@osf.org (USENET News System)
  8. Organization: Open Software Foundation
  9. References: <9301082259.AA16974@questercorp>
  10. Date: 11 Jan 93 12:59:16
  11. Lines: 20
  12.  
  13. In article <9301082259.AA16974@questercorp> stephen@tangent1.UUCP (Stephen McKay) writes:
  14.  
  15.        I have created a DrawArea widget under motif and have colored the foreground of this region using Xcolor "DeepSkyBlue".
  16.  
  17.        The problem comes when I want to select the foreground color to use with rubberbanding. ie. a rectangle.  What is the method fo selecting a foreground (x) color that when used with Xor, displays the desired color (y)?
  18.  
  19.        Note: If the DrawArea is XFillRectangle with "DeepSkyBlue" and I draw a line with logical function GXxor and foreground color = "White", the color of the line drawn is "DeepSkyBlue".
  20.  
  21. This is probably in the FAQ,  you need to set plane_mask to the
  22. OR of the two colors involved.  A detailed description exists in
  23. at least the O'Reilly books.  The short explanation is that  XOR
  24. xors all the pixel bits and the result had better be a valid
  25. pixel value.
  26.  
  27.  
  28. --
  29. Douglas S. Rand <drand@osf.org>        OSF/Motif Dev.
  30. Snail:         11 Cambridge Center,  Cambridge,  MA  02142
  31. Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
  32. Amateur Radio: KC1KJ
  33.