home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20496 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.6 KB  |  36 lines

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