home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!str-ccsun!ccsun.strath.ac.uk!cnbs63
- From: cnbs63@ccsun.strath.ac.uk ("J.T.Bennett")
- Newsgroups: comp.windows.x
- Subject: What is the format of Pixmaps
- Keywords: Pixmaps, GC
- Message-ID: <1992Dec10.114239.12576@ccsun.strath.ac.uk>
- Date: 10 Dec 92 11:42:39 GMT
- Sender: news@ccsun.strath.ac.uk (News account )
- Organization: University of Strathclyde
- Lines: 19
- Nntp-Posting-Host: wyvis
-
- 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
- image in a drawable to display it. So I created a pixmap with XCreatePixmap command and then
- transfer the image to the pixmap. This is where the problem comes in.
-
- The image is stored in an integer array consisting of numbers between 0 and 99 (100 colours).
- The only command I could find in the Xlib - C Interface book by Gettys, Scheifler and Newman
- was :
-
- XDrawPoints(dpy, pixmap, gc, ...)
-
- I generate an array of positions for colour 0 and set the foreground colour of the GC to
- colour 0 and call the above routine. I do this for each 100 colours.
-
- Does anyone know the format of the pixmap so that I can write the pixel value directly into
- the pixmap array rather than using a intermediate routine which takes much longer !
-
- Thank you for attention !
-
- Jeremy
-