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, andClipRectprocedures to assist you when scrolling and drawing into a window. TheScrollRectprocedure scrolls the pixels of a specified portion of a basic graphics port's bitmap (or a color graphics port's pixel map). TheSetOriginprocedure lets you shift the coordinate plane of the current graphics port (basic or color). TheClipRect,GetClip, andSetClipprocedures 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
BitMapToRegionfunction.The
PortSizeandMovePortToprocedures 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
SetPortBitsprocedure 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