home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / windows / x / 20354 < prev    next >
Encoding:
Text File  |  1992-12-20  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!mouse
  3. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  4. Subject: Re: Problem copying from Window to Pixmap
  5. Message-ID: <1992Dec18.013508.15485@thunder.mcrcim.mcgill.edu>
  6. Organization: McGill Research Centre for Intelligent Machines
  7. References: <BzB2vH.Fup@dutiws.twi.tudelft.nl>
  8. Date: Fri, 18 Dec 92 01:35:08 GMT
  9. Lines: 21
  10.  
  11. In article <BzB2vH.Fup@dutiws.twi.tudelft.nl>, graaff@IS.TWI.TUDelft.NL (Hans de Graaff) writes:
  12.  
  13. > I have a problem copying data from a Window to a Pixmap.
  14. > I have the following code to do that:
  15.  
  16. > Pixmap pm = XCreatePixmap(dpy, xwin, w, h, 1);
  17. > XCopyPlane(dpy, xwin, pm, gc, 0, 0, w, h, 0, 0, 1L);
  18.  
  19. > X Error of failed request:  BadMatch (invalid parameter attributes)
  20. >   Major opcode of failed request:  63 (X_CopyPlane)
  21.  
  22. Most likely the GC depth matches the depth of xwin rather than the
  23. depth of pm.  Try creating a GC using pm as the drawable instead.
  24. (Make sure to set the foreground and background values appropriately
  25. for what you want; the default values would cause XCopyPlane to invert
  26. the bitplane it copies, which could be confusing.)
  27.  
  28.                     der Mouse
  29.  
  30.                 mouse@larry.mcrcim.mcgill.edu
  31.