Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 2 - Basic QuickDraw / Basic QuickDraw Reference

Managing Bitmaps, Port Rectangles, and Clipping Regions

You can use the ScrollRect, SetOrigin, GetClip, SetClip, and ClipRect procedures to assist you when scrolling and drawing into a window. The ScrollRect procedure scrolls the pixels of a specified portion of a basic graphics port's bitmap (or a color graphics port's pixel map). The SetOrigin procedure lets you shift the coordinate plane of the current graphics port (basic or color). The ClipRect, GetClip, and SetClip 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 and MovePortTo 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 using SetPortBits, you should use the offscreen graphics capabilities described in the chapter "Offscreen Graphics Worlds" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996