ScrollRect
ScrollRect Move bits a specified distance in rectangular area
#include <Quickdraw.h> Quickdraw
void ScrollRect( theRect, distHoriz, distVert, updateRgn );
Rect *theRect ; rectangle enclosing area to be scrolled
short distHoriz ; >0 = scroll bits right, <0 = scroll left
short distVert ; >0 = scroll bits down, <0 = scroll up
RgnHandle updateRgn ; becomes region vacated by scroll
ScrollRect copies bits enclosed by a rectangle and stores them within that
same rectangle, at a specified horizontal and vertical offset.
theRect is the address of an 8-byte Rect structure, defined in local
coordinates. It defines both the source of the bit transfer and a
temporary clipping region applied after the bits are moved.
distHoriz specifies the horizontal distance, in pixels, to move the bits.
Positive values move the bits to the right; negative to the left.
distVert specifies the vertical distance, in pixels, to move the bits. Positive
values move the bits downward; negative upward.
updateRgn is the handle of a region that must already exist (see NewRgn).
Upon return, the region definition will describe the area that has
been "vacated" by the scroll operation.
Returns: none

Notes: ScrollRect is a special form of CopyBits, performing the common
operation of moving the contents of a window (or other rectangular screen
area) up, down, left, or right.
In this example, the image is scrolled up and left, so data is lost from the
top and left side. The vacated area on the bottom and right side is erased
(filled with the background pattern of the current GrafPort), and the
updateRgn takes on the size, shape, and position of that vacated area.
The resulting image is clipped to the intersection of the GrafPort's
portBits.bounds rectangle, the visRgn, the clipRgn, the portRect, and
theRect .
The ScrollRect function has no effect on the pen position, nor does it
make any change to the local coordinate system.
A normal scroll sequence might follow up by using SetOrigin (to
compensate for the scroll and to realign the pen with the image) and
InvalRgn (to force an update event - in order to draw information into
the vacated area).