Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!agate!shelby!neon!kaufman From: kaufman@Neon.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: How does one save/restore clipping? Message-ID: <1991Jan6.225428.10958@Neon.Stanford.EDU> Date: 6 Jan 91 22:54:28 GMT References: <1CE00001.csbntk@tbomb.ice.com> <47697@apple.Apple.COM> <22461@well.sf.ca.us> Organization: Computer Science Department, Stanford University Lines: 18 In article <22461@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes: .The update procedure for most of my panes just draws the frame, and .recursively calls the update procedure in each of the sub-panes. .Which is fine, except for the outermost pane of the window. It uses: . ./* RestrictVisClipRgn - set clip to intersection of old and new, and return old. . also clip off the visRgn . .So that if the window is partially obscured by another, the visRgn will be .taken into account, by ClippedOff(). I am under the impression that all drawing is AUTOMATICALLY clipped to the visRgn. My preference is to set the outermost clip region to portRect, to keep it rectangular for faster checking. If visRgn is complex you may have to endure more complex checking (i.e. checking essentially the same region twice) when drawing in the visible area. Marc Kaufman (kaufman@Neon.stanford.edu)