home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 16099 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.6 KB

  1. Xref: sparky comp.windows.x:16099 comp.graphics:9417
  2. Path: sparky!uunet!ogicse!news.u.washington.edu!milton.u.washington.edu!bolson
  3. From: bolson@milton.u.washington.edu (Ed Bolson)
  4. Newsgroups: comp.windows.x,comp.graphics
  5. Subject: Rubber banding/overlays on grayscale in X-windows
  6. Message-ID: <1992Sep3.170048.29066@u.washington.edu>
  7. Date: 3 Sep 92 17:00:48 GMT
  8. Article-I.D.: u.1992Sep3.170048.29066
  9. Sender: news@u.washington.edu (USENET News System)
  10. Organization: University of Washington, Seattle
  11. Lines: 30
  12.  
  13. We are developing software on 8-bit displays that necessitate 
  14. displaying a gray-scale image in an X-window and then performing 
  15. "rubber-banding" of overlaid lines in the image.  Traditionally, this 
  16. is done by the XOR operation.
  17.  
  18. However, XOR works poorly if you wish to display your overlay in a 
  19. single color.
  20.  
  21. Are there obvious methods of displaying overlaid data on an image under X?
  22.  
  23. I have thought of using CopyArea to replace the image (effectively erasing the 
  24. overlay each time) and then redrawing.  This could cause high 
  25. communications costs over the "X-wire", as we are often going to draw 
  26. spline-based curves rather than straight lines or arcs.
  27.  
  28. Another thought was 2 offscreen pixmaps.  One with the image, and the 
  29. other would have the current copy of the overlay.  However, I have not 
  30. come up with logic that will copy only the non-0 pixels of the overlay 
  31. onto the image.
  32.  
  33. Any help would be greatly appreciated.
  34.  
  35. Thanks,
  36.  
  37. Ed
  38. -- 
  39. Ed Bolson
  40. University of Washington  Cardiovascular Research               (206)543-4535
  41. bolson@u.washington.edu (preferred)
  42. bolson@max.bitnet                bolson@milton.u.washington.edu (if you must)
  43.