home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / fj / maillis / xwindow / 17627 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.8 KB

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!daemon
  2. From: adrian@ora.com (Adrian Nye)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: The GC in XCopyPlane
  5. Message-ID: <1992Nov19.031538.25996@sm.sony.co.jp>
  6. Date: 19 Nov 92 03:15:38 GMT
  7. Sender: daemon@sm.sony.co.jp (The devil himself)
  8. Distribution: fj
  9. Organization: Workstation Div., Supermicro Systems Group, Sony Corporation
  10. Lines: 30
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Message-Id: <9211182254.AA00531@spike.ora.com>
  14. In-Reply-To: Your message of Wed, 18 Nov 92 15:25:17 -0500.             <199211182025.AA25150@ora.com> 
  15. Date: Wed, 18 Nov 92 16:54:11 +0900
  16. Sender: adrian@ora.com
  17.  
  18.  
  19. >   When I invoked XCopyPlane with my GC I had a BadMatch error.  When I
  20. > used the default everything was OK (but in reverse video :-().  What
  21. > was worse was that I used XChangeGC to set them to my preferred way
  22. > and the code then worked without error.
  23. >  I find this behaviour very bizarre and I am at a loss to explain the
  24. > reason for the error.  Is the error strikingly obvious or am I just
  25. > unlucky?
  26.  
  27. Your problem is that the depths don't match.  When you create a GC,
  28. you specify a drawable and the GC matches the depth of that drawable.
  29. If you then use that GC on a drawable of a different depth,
  30. you get an error.
  31.  
  32. In this case, the pixmap has depth 1, so the GC (the way you created
  33. it) had depth 1, and then you tried to use it on a color drawable (with
  34. depth > 1).  BadMatch.
  35.  
  36. *************************************************************
  37. Adrian Nye (314) 531-1231    Editor, The X Resource
  38. O'Reilly & Associates, Inc., Publishers of Nutshell Handbooks
  39. 4466 West Pine Blvd.  20-G   St. Louis MO 63108
  40. Internet:   adrian@ora.com        UUCP:   uunet!ora!adrian      
  41. *************************************************************
  42.