ValidRect
ValidRect
Keep a rectangular area from being updated Rect *goodRect ; rectangle in local coordinates ValidRect avoids redundant screen drawing by telling the Window Manager when an area of the window does not need to be redrawn.
Notes: This is often used after sizing a document window and then drawing the
controls. Since the scroll bar and size box are now valid, there is no reason
to have them redrawn along with the rest of the window. There may be
other reasons to protect an area of a window from being updated; for
instance, you may wish to have a window with a hole, which shows part of
the window beneath it.
Using this call to reduce the amount to redrawing will have a significant
effect on the perceived speed of an application.
ValidRgn performs the same service, but for a region rather than a rectangle.