Important: The information in this document is obsolete and should not be used for new development.
Managing Bitmaps, Port Rectangles, and Clipping Regions
You can use theScrollRect
,SetOrigin
,GetClip
,SetClip
, andClipRect
procedures to assist you when scrolling and drawing into a window. TheScrollRect
procedure scrolls the pixels of a specified portion of a basic graphics port's bitmap (or a color graphics port's pixel map). TheSetOrigin
procedure lets you shift the coordinate plane of the current graphics port (basic or color). TheClipRect
,GetClip
, andSetClip
procedures let you create, save, and set clipping regions in a graphics port (basic or color).You can convert bitmaps (or, for color graphics ports, pixel maps) to regions using the
BitMapToRegion
function.The
PortSize
andMovePortTo
procedures are normally called only by Window Manager routines that manipulate the port rectangle of a window. These routines are described here for completeness.You can use the
SetPortBits
procedure to set the bitmap for the current graphics port. This procedure was created for initial versions of QuickDraw to allow you to perform drawing and calculations on a buffer other than the screen. However, instead of usingSetPortBits
, you should use the offscreen graphics capabilities described in the chapter "Offscreen Graphics Worlds" in this book.
Subtopics
- ScrollRect
- SetOrigin
- PortSize
- MovePortTo
- GetClip
- SetClip
- ClipRect
- BitMapToRegion
- SetPortBits