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

  1. Path: sparky!uunet!wupost!darwin.sura.net!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
  2. From: oj@miki.pictel.com (Oliver Jones)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: An Open Challenge (it can't be done!)
  5. Message-ID: <1992Dec24.200211.16311@sm.sony.co.jp>
  6. Date: 24 Dec 92 20:02:11 GMT
  7. Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
  8. Distribution: fj
  9. Organization: PictureTel Corporation
  10. Lines: 65
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: Wed, 23 Dec 1992 19:03:42 GMT
  14. Message-Id: <1992Dec23.190342.1067@miki.pictel.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) writes:
  20.  
  21. >...The application is used for many
  22. >kinds of area selection operations which require drawing selector
  23. >boxes and polygons on the screen. ...
  24.  
  25. > - 8 bit image in backing pixmap used to update window
  26. > - Image drawn in 8 bit X window
  27. > - Want to draw diagonal lines on top of image that can
  28. >   be removed quickly (i.e. replace them with the data they so
  29. >   recently covered)
  30. > - Can't do server extensions (too many platforms to support)
  31.  
  32. If I understand your requirement correctly, you want to draw visible,
  33. yet ephemeral, annotations on your complex image, so your users can
  34. see the region of interest they're selecting (or whatever).
  35.  
  36. >...we use GXxor mode to draw them. This is okay if the image is
  37. >all one color but for a complex satellite image or a noisy image 
  38. >an xor'ed line is nearly invisible. 
  39.  
  40. From your description, you're taking the approach that you want
  41. your users to see the annotation clearly.  But, I don't see anything
  42. in your requirements saying that the annotation has to be
  43. black, or white, or any particular color.  Just visible.
  44.  
  45. So, why don't you animate the annotation somehow, so the users can
  46. discern it via motion of some sort?  It's easy to discern changing
  47. colors, even if the colors themselves don't have enough contrast
  48. to tell them apart when drawn statically.
  49.  
  50. Draw all the annotation with XOR.  While the annotation is up,
  51. continually erase and redraw it three times a second (from an Xt timer
  52. proc) slightly differently.
  53.  
  54. Two approaches come to mind:  
  55.  
  56. (1) do xor drawing cycling through a series of about eight different
  57.     foreground values -- for example:
  58.  
  59.         1111 1110    FE
  60.         1111 1101    FD
  61.         1111 1011    FB
  62.         1111 0111    F7
  63.         1110 1111    EF
  64.         1101 1111    DF
  65.         1011 1111    BF
  66.         0111 1111    7F
  67.  
  68.     Even though the effect of XOR drawing in a random color map
  69.     yields random colors, this technique should yield enough
  70.     different random colors on your annotation lines over
  71.     a period of a couple of seconds that users will see them
  72.     clearly.
  73.  
  74. (2) draw the annotation lines dashed, and redraw them continually
  75.     as you reset the origin of the dash pattern.   This will make
  76.     the annotation lines crawl, the way lassos and marquees do
  77.     on Mac drawing programs.
  78.