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

  1. Path: sparky!uunet!noc.near.net!mars.caps.maine.edu!maine.maine.edu!michael
  2. Subject: Re: GXcopy and GXxor
  3. Organization: University of Maine System
  4. Newsgroups: comp.windows.x
  5. References: <xia.711911424@odin> <MICHAEL.920724095149@maine.maine.EDU>
  6.             <81@hallofjustice.UUCP>
  7. Message-ID: <MICHAEL.920726210754@maine.maine.EDU>
  8. From:    michael@maine.maine.edu (Michael Johnson)
  9. To:      NETNEWS@MAINE
  10. Date:    Sun, 26 Jul 92 21:07:54 EDT
  11. Lines: 29
  12.  
  13. In article <81@hallofjustice.UUCP> sram@lccinc.UUCP (Siddharth Ram) writes:
  14. >In article <MICHAEL.920724095149@maine.maine.EDU>, michael@maine.maine.edu
  15. >(Michael Johnson) writes:
  16. >> In article <xia.711911424@odin> xia@molbio.ethz.ch (Xia Tai-he) writes:
  17. >> >However, the lines drawn with the second GC don't have
  18. >> >the color I have set, whose colors differ depending on the
  19. >> >objects alreay existing on the screen. Could you give
  20. >>
  21. >> There's not really much you can do about it. When you XOR the pixels, the
  22. >> resulting pixel value is going to yield whatever color that pixel maps to.
  23. >
  24. >you can do something about it, provided you are willing to
  25. >use up an overlay plane, or install you own colormap. then you
  26. >would have control over all the colorcells.
  27.  
  28. This assumes that you have a R/W colormap in the server. It is also not too
  29. friendly when there is only one colormap to be shared by all windows. It may
  30. give the rubber-banding color you want, but it will cause all other colors on
  31. the display to be messed up.
  32.  
  33. In the general case, there really is not much you can do about it. The nature
  34. of the XOR operation and mapping between pixels and RGB entries makes this so.
  35.  
  36. My earlier suggestion (use the value -1 cast to Pixel for your rubber-banding)
  37. will yield the most consistent results. It works for me, and appears to be what
  38. the Motif window manager uses as well.
  39.  
  40. Michael Johnson, VM Systems Group                     michael@maine.maine.edu
  41. "I will choose the path that's clear. I will choose Free Will." -- Neil Peart
  42.