home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19378 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.8 KB

  1. Path: sparky!uunet!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
  2. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: The GC in XCopyPlane
  5. Message-ID: <1992Nov20.095230.20490@thunder.mcrcim.mcgill.edu>
  6. Date: 20 Nov 92 09:52:30 GMT
  7. References: <IDF.92Nov13023005@fat-controller.cs.bham.ac.uk>
  8. Organization: McGill Research Centre for Intelligent Machines
  9. Lines: 34
  10.  
  11. > Distribution: comp
  12.  
  13. Please don't misuse newsgroup hierarchy names as distributions.
  14.  
  15. In article <IDF.92Nov13023005@fat-controller.cs.bham.ac.uk>, idf@cs.bham.ac.uk (Ian Fitchet) writes:
  16.  
  17. > Being a pseudo-ignoramous I merrily copied the code from O'Reilly
  18. > Vol4 involving XCopyPlane.  All was well until I actually tried the
  19. > code out on a colour monitor (worked fine on a monochrome - the
  20. > XCopyArea bit).  [used own gc rather than screen default gc]
  21.  
  22. > [ Code showing how gc in use was created, with "pixmap" as the
  23. >   drawable in the XCreateGC call.  We are not shown anything else
  24. >   about this object. ]
  25.  
  26. > [This gc] differed in only two respects from the GC returned by
  27. > DefaultGCOfScreen().  Firstly, it had a different gid (== GC id??)
  28. > and secondly the values of foreground and background were reversed.
  29.  
  30. I suspect it also was only one bit deep, whereas the default GC was as
  31. deep as the default visual (probably 8 bits).  The GC you create will
  32. be as deep as "pixmap"; you didn't show enough code for me to determine
  33. how deep this is, but I suspect it's only one bit.
  34.  
  35. > When I invoked XCopyPlane with my GC I had a BadMatch error.
  36.  
  37. This is normal if the GC is in fact not the same depth as the
  38. destination drawable - the GC you pass to XCopyPlane must be compatible
  39. with the *destination* drawable, not the *source* drawable.
  40.  
  41.                     der Mouse
  42.  
  43.                 mouse@larry.mcrcim.mcgill.edu
  44.