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
Routines / Managing Bitmaps, Port Rectangles, and Clipping Regions


BitMapToRegion

You can use the BitMapToRegion function to convert a bitmap or pixel map to a region.

FUNCTION BitMapToRegion (region: RgnHandle; bMap: BitMap): OSErr;
region
A handle to a region to hold the converted BitMap or PixMap record.
bMap
A BitMap or PixMap record.
DESCRIPTION
The BitMapToRegion function converts a given BitMap or PixMap record to a region. You would generally use this region later for drawing operations. The region parameter must be a valid region handle created with the NewRgn function (described in the chapter "QuickDraw Drawing"). The old region contents are lost.

The bMap parameter may be either a BitMap or PixMap record. If you pass a PixMap record, its pixel depth must be 1.

RESULT CODES
pixmapTooDeepErr-148Pixel map is deeper than 1 bit per pixel
rgnTooBigErr-500Bitmap would convert to a region greater than 64 KB

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996