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

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