home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!stanford.edu!lucid.com!karoshi!jwz
- From: Jamie Zawinski <jwz@lucid.com>
- Subject: Re: An Open Challenge (it can't be done!)
- In-Reply-To: gt4417a@prism.gatech.EDU's message of 22 Dec 92 15:52:03 GMT
- Message-ID: <JWZ.92Dec22135831@thalidomide.lucid.com>
- Lines: 23
- Sender: usenet@lucid.com
- Organization: Lucid, Inc., Menlo Park, CA
- References: <78716@hydra.gatech.EDU>
- Date: Tue, 22 Dec 92 21:57:49 GMT
-
- In article <78716@hydra.gatech.EDU> gt4417a@prism.gatech.EDU (SKELTON,JOEL PHILLIP) wrote:
- >
- > Here's the short form:
- > - 8 bit image in backing pixmap used to update window
- > - Image drawn in 8 bit X window
- > - Want to draw diagonal lines on top of image that can
- > be removed quickly (i.e. replace them with the data they so
- > recently covered)
- > - Can't do server extensions (too many platforms to support)
-
- One way of doing this would be to allocate a color plane for your overlay
- line. You said that the images are quantized into an 8 bit pixmap; if this is
- because your server only has 8 planes, then you'd have to quantize into 7
- planes instead, reserving one for the overlay. Also this requires that you
- have a PseudoColor display (because you need writable color cells.)
-
- The function you want to do this is XAllocColorPlanes(). Basically, you want
- to allocate a plane, write the same color values into all cells corresponding
- to that plane, and then draw your lines into that plane using the GCPlaneMask
- GC component. For an example of how to do this, see qix.c in the xscreensaver
- distribution (on export.lcs.mit.edu in contrib/xsaver.tar.Z.)
-
- -- Jamie
-