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