home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!agate!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: jwz@lucid.com (Jamie Zawinski)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: An Open Challenge (it can't be done!)
- Message-ID: <1992Dec23.023053.28635@sm.sony.co.jp>
- Date: 23 Dec 92 02:30:53 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Lucid, Inc., Menlo Park, CA
- Lines: 29
- Approved: michael@sm.sony.co.jp
-
- Date: Tue, 22 Dec 92 21:57:49 GMT
- Message-Id: <JWZ.92Dec22135831@thalidomide.lucid.com>
- Newsgroups: comp.windows.x
- References: <78716@hydra.gatech.EDU>
- Sender: xpert-request@expo.lcs.mit.edu
-
- 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
-