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

  1. Path: sparky!uunet!centerline!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>
  6. Message-ID: <MICHAEL.920724095149@maine.maine.EDU>
  7. From:    michael@maine.maine.edu (Michael Johnson)
  8. To:      NETNEWS@MAINE
  9. Date:    Fri, 24 Jul 92 09:51:49 EDT
  10. Lines: 21
  11.  
  12. In article <xia.711911424@odin> xia@molbio.ethz.ch (Xia Tai-he) writes:
  13. >I have created a GC with function GXcopy and another GC with GXxor for
  14. >drawing rubber-band lines,
  15. >I also set the foreground colors for the two GCs. When I
  16. >draw lines with the first GC, I get the correct color.
  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. >me a suggestion to get rid of it?
  21.  
  22. There's not really much you can do about it. When you XOR the pixels, the
  23. resulting pixel value is going to yield whatever color that pixel maps to.
  24. Do you understand what an XOR operation is?
  25.  
  26. I find that a useful value for rubber-banding with XOR is -1, cast to Pixel.
  27. This usually yields a consistent color (usually black, though I've seen cases
  28. where an application actually allocated pixels that high, resulting in a
  29. different color).
  30.  
  31. Michael Johnson, VM Systems Group                     michael@maine.maine.edu
  32. "I will choose the path that's clear. I will choose Free Will." -- Neil Peart
  33.