[comp.windows.x] putting XYBitmap in 8plane window?

rusty@GARNET.BERKELEY.EDU (04/21/89)

   From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler)
   Newsgroups: comp.windows.x
   Subject: Re: putting XYBitmap in 8plane window?
   Date: 20 Apr 89 11:54:45 GMT
   Organization: The Internet


       Can anyone explain how to write a one plane bitmap to a single
       plane of a window of depth 8?

   If the bitmap is in an XImage on the client side, it's format
   should be XYBitmap, and you should set the plane_mask in the GC to
   have just the single plane of intereset set.  You will also want
   the corresponding bit in both the foreground and background pixels
   of the GC set appropriately.

That all sounds nice but us blockheads were wondering if you could you
provide an example of setting the plane_mask and the "corresponding
bit in both the foreground and background pixels..."?

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (04/21/89)

    That all sounds nice but us blockheads were wondering if you could you
    provide an example of setting the plane_mask and the "corresponding
    bit in both the foreground and background pixels..."?

(I don't normally have time to gift wrap things ... :-)
If the plane you want is plane N (numbered from zero), you set the plane mask
to (1L << N), and you set foreground to (1L << N) and background to 0 (or
vice versa, depending on how you want the image to appear).