home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / windows / x / 20268 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  999 b 

  1. Path: sparky!uunet!spool.mu.edu!hri.com!noc.near.net!gateway!miki!oj
  2. From: oj@miki.pictel.com (Oliver Jones)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Problem copying from Window to Pixmap
  5. Message-ID: <1992Dec16.140254.3109@miki.pictel.com>
  6. Date: 16 Dec 92 14:02:54 GMT
  7. References: <BzB2vH.Fup@dutiws.twi.tudelft.nl>
  8. Organization: PictureTel Corporation
  9. Lines: 16
  10.  
  11. In article <BzB2vH.Fup@dutiws.twi.tudelft.nl> graaff@IS.TWI.TUDelft.NL 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. >Pixmap pm = XCreatePixmap(dpy, xwin, w, h, 1);
  16. >XCopyPlane(dpy, xwin, pm, gc, 0, 0, w, h, 0, 0, 1L);
  17.  
  18. >... X ... tells me that:
  19. >X Error of failed request:  BadMatch (invalid parameter attributes)
  20. >  Major opcode of failed request:  63 (X_CopyPlane) ...
  21.  
  22. The GC you use in an XCopyPlane request has to match
  23. the DESTINATION in depth (and screen).
  24.  
  25. Create a GC with reference to your one plane pixmap, use it
  26. in your copy operation, and everything will work.
  27.