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

  1. Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!str-ccsun!ccsun.strath.ac.uk!cnbs63
  2. From: cnbs63@ccsun.strath.ac.uk ("J.T.Bennett")
  3. Newsgroups: comp.windows.x
  4. Subject: What is the format of Pixmaps
  5. Keywords: Pixmaps, GC
  6. Message-ID: <1992Dec10.114239.12576@ccsun.strath.ac.uk>
  7. Date: 10 Dec 92 11:42:39 GMT
  8. Sender: news@ccsun.strath.ac.uk (News account )
  9. Organization: University of Strathclyde
  10. Lines: 19
  11. Nntp-Posting-Host: wyvis
  12.  
  13. I am writing a program under Openwindows 3 on a Sparc workstation that generates a graphic image from some data and need to store the
  14. image in a drawable to display it. So I created a pixmap with XCreatePixmap command and then
  15. transfer the image to the pixmap. This is where the problem comes in.
  16.  
  17. The image is stored in an integer array consisting of numbers between 0 and 99 (100 colours).
  18. The only command I could find in the Xlib - C Interface book by Gettys, Scheifler and Newman
  19. was :
  20.  
  21.   XDrawPoints(dpy, pixmap, gc, ...)
  22.  
  23. I generate an array of positions for colour 0 and set the foreground colour of the GC to
  24. colour 0 and call the above routine. I do this for each 100 colours.
  25.  
  26. Does anyone know the format of the pixmap so that I can write the pixel value directly into
  27. the pixmap array rather than using a intermediate routine which takes much longer !
  28.  
  29. Thank you for attention !
  30.  
  31. Jeremy
  32.