home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 18860 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.8 KB

  1. 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
  2. From: jwz@lucid.com (Jamie Zawinski)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: An Open Challenge (it can't be done!)
  5. Message-ID: <1992Dec23.023053.28635@sm.sony.co.jp>
  6. Date: 23 Dec 92 02:30:53 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: Lucid, Inc., Menlo Park, CA
  10. Lines: 29
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: Tue, 22 Dec 92 21:57:49 GMT
  14. Message-Id: <JWZ.92Dec22135831@thalidomide.lucid.com>
  15. Newsgroups: comp.windows.x
  16. References: <78716@hydra.gatech.EDU>
  17. Sender: xpert-request@expo.lcs.mit.edu
  18.  
  19. In article <78716@hydra.gatech.EDU> gt4417a@prism.gatech.EDU (SKELTON,JOEL PHILLIP) wrote:
  20. > Here's the short form:
  21. >  - 8 bit image in backing pixmap used to update window
  22. >  - Image drawn in 8 bit X window
  23. >  - Want to draw diagonal lines on top of image that can
  24. >    be removed quickly (i.e. replace them with the data they so
  25. >    recently covered)
  26. >  - Can't do server extensions (too many platforms to support)
  27.  
  28. One way of doing this would be to allocate a color plane for your overlay
  29. line.  You said that the images are quantized into an 8 bit pixmap; if this is
  30. because your server only has 8 planes, then you'd have to quantize into 7
  31. planes instead, reserving one for the overlay.  Also this requires that you
  32. have a PseudoColor display (because you need writable color cells.)
  33.  
  34. The function you want to do this is XAllocColorPlanes().  Basically, you want
  35. to allocate a plane, write the same color values into all cells corresponding
  36. to that plane, and then draw your lines into that plane using the GCPlaneMask
  37. GC component.  For an example of how to do this, see qix.c in the xscreensaver
  38. distribution (on export.lcs.mit.edu in contrib/xsaver.tar.Z.)
  39.  
  40.     -- Jamie
  41.