home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 19043 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  771 b 

  1. Path: sparky!uunet!inmos!wraxall.inmos.co.uk!elberton!nathan
  2. Newsgroups: comp.windows.x
  3. From: nathan@inmos.co.uk (Nathan Sidwell)
  4. Subject: Getting pixel values from a pixmap
  5. Message-ID: <1992Nov12.105105.8982@wraxall.inmos.co.uk>
  6. X-Newsreader: Tin 1.1 PL5
  7. Date: Thu, 12 Nov 92 10:51:04 GMT
  8. Lines: 15
  9.  
  10. In a conversion program I'm writing I need to read some pixel values back
  11. from a depth 1 pixmap, after doing some drawing to the pixmap. The easiest
  12. way I can figure out how to do this is
  13.  
  14. image = XGetImage(display, pixmap, x, y, 1, 1, (long)1, XYBitmap);
  15. pixel = XGetPixel(image, 0, 0);
  16. XDestroyImage(image);
  17.  
  18. is there a better way? ie one that reads directly from the pixmap.
  19.  
  20. nathan
  21. --
  22.  
  23. Nathan Sidwell  INMOS UK |                 | nathan@inmos.co.uk       DoD#0390
  24.  
  25.