home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5289 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.3 KB

  1. Path: sparky!uunet!ogicse!usenet.coe.montana.edu!rpi!usc!cs.utexas.edu!tamsun.tamu.edu!news
  2. From: d1h1883@sc.tamu.edu (Dave Hess)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: ScollView Strangesness ?
  5. Message-ID: <1992Jul28.162738.15249@tamsun.tamu.edu>
  6. Date: 28 Jul 92 16:27:38 GMT
  7. Article-I.D.: tamsun.1992Jul28.162738.15249
  8. References: <64476@hydra.gatech.EDU>
  9. Sender: news@tamsun.tamu.edu (Read News)
  10. Reply-To: David-Hess@tamu.edu
  11. Organization: Texas A&M University, College Station
  12. Lines: 47
  13.  
  14.  
  15. In article <64476@hydra.gatech.EDU> cc100aa@xray.gatech.edu (Ray Spalding)  
  16. writes:
  17. [...]
  18. > One way to fix this is to set the proper clipping path before
  19. > displaying your background view.  Something like:
  20. > - drawSelf:(const NXRect *)rects :(int)rectCount
  21. > {
  22. >         if (rectCount == 1) NXRectClip(rects);
  23. >         else NXRectClipList(rects+1,2);
  24. > -- 
  25. > Ray Spalding, Office of Information Technology
  26. > Georgia Institute of Technology, Atlanta Georgia, 30332-0715
  27. > Internet: ray.spalding@oit.gatech.edu (NeXT Mail accepted)
  28.  
  29. Is this correct? DL says:
  30.  
  31. ---CUT---
  32. NXRectClip() intersects the current clipping path with the rectangle referred
  33. to by its argument, aRect, to determine a new clipping path. 
  34. NXRectClipList() takes an array of count number of rectangles and intersects
  35. the current clipping path with each of them.  Thus, the new clipping path is
  36. the graphic intersection of all the rectangles and the original clipping
  37.     ^^^^^^^^^^^^^^^^^^^^
  38. path.  Both functions work through the rectclip operator.  After computing
  39. the new clipping path, the current path is reset to empty.
  40. ---CUT---
  41.  
  42. I believe the Concepts manual says that if rectCount == 2 then the two  
  43. rectangles will be disjoint (e.g. due to a diagonal scroll). In this case  
  44. then the above code would clip out everything and no redrawing would occur.  
  45. Fortunately, this case usually only occurs under program control so this  
  46. rarely happens.
  47.  
  48. A stumbled across this issue in the Draw source. In there, if there are 2  
  49. rectangles, then the image is drawn twice, the first time clipped to the  
  50. first rectangle and then again clipped to the other rectangle. You would  
  51. either have to do that or set up a PostScript clipping path.
  52.  
  53. Dave
  54.  
  55. --
  56. David K. Hess
  57. Graduate Assistant                     David-Hess@tamu.edu
  58. Supercomputer Center                  Texas A&M University
  59.