home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sun / misc / 5204 < prev    next >
Encoding:
Text File  |  1992-11-11  |  3.3 KB  |  75 lines

  1. Path: sparky!uunet!know!hri.com!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!uc.msc.edu!shamash!runyon.cim.cdc.com!pbd
  2. From: pbd@runyon.cim.cdc.com (Paul Dokas x4629)
  3. Newsgroups: comp.sys.sun.misc
  4. Subject: Clipping with XGL
  5. Message-ID: <49519@shamash.cdc.com>
  6. Date: 11 Nov 92 19:58:25 GMT
  7. Sender: usenet@shamash.cdc.com
  8. Organization: ICEM Systems, Inc.
  9. Lines: 64
  10.  
  11. Does anyone know how to clip to a non-rectangular region with XGL?
  12. The best that I can figure out is that XGL only allows 2D clipping
  13. to rectangular areas, not arbitrary regions.
  14.  
  15. For example, I want the window to look like this:
  16.  
  17. _______________________________________________________
  18. |                                                     |
  19. |                                                     |
  20. |                 geometry here                       |
  21. |                                                     |
  22. |                                                     |
  23. |                                  --------------------
  24. |                                  |                  |
  25. |                                  |                  |
  26. |                                  |    text here     |
  27. |                                  |                  |
  28. |                                  |                  |
  29. |                                  --------------------
  30. |                                                     |
  31. |                                                     |
  32. |                                                     |
  33. |                                                     |
  34. |                                                     |
  35. -------------------------------------------------------
  36.  
  37. therefore the masking region would look like a fat C:
  38.  
  39. _______________________________________________________
  40. |                                                     |
  41. |                                                     |
  42. |                                                     |
  43. |                                                     |
  44. |                                                     |
  45. |                                  --------------------
  46. |                                  |
  47. |                                  |
  48. |                                  |
  49. |                                  |
  50. |                                  |
  51. |                                  --------------------
  52. |                                                     |
  53. |                                                     |
  54. |                                                     |
  55. |                                                     |
  56. |                                                     |
  57. -------------------------------------------------------
  58.  
  59. Unfortunately, the best that XGL seems to be able to do is use
  60. rectangular clipping areas :-(
  61.  
  62. BTW, I can't solve this problem by drawing the geometry and then
  63. drawing the text.  I just takes too long.  Also, I need to handle
  64. rubberbanding that doesn't cross the text area at all.
  65.  
  66. What I wouldn't give for overlay planes.
  67.  
  68. My machine is a SS2 with a GS card, SunOS 4.1.3, OW3.0, etc...
  69.  
  70. -- 
  71. #include <std.disclaimer>
  72. #define FULL_NAME                          "Paul Dokas"
  73. #define EMAIL                              "pbd@runyon.cim.cdc.com"
  74. /*                     oh what the hell                     */
  75.