Important: The information in this document is obsolete and should not be used for new development.
BitMapToRegion
You can use theBitMapToRegion
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
orPixMap
record.bMap
- A
BitMap
orPixMap
record.DESCRIPTION
TheBitMapToRegion
function converts a givenBitMap
orPixMap
record to a region. You would generally use this region later for drawing operations. Theregion
parameter must be a valid region handle created with theNewRgn
function (described in the chapter "QuickDraw Drawing"). The old region contents are lost.The
bMap
parameter may be either aBitMap
orPixMap
record. If you pass aPixMap
record, its pixel depth must be 1.RESULT CODES
pixmapTooDeepErr -148 Pixel map is deeper than 1 bit per pixel rgnTooBigErr -500 Bitmap would convert to a region greater than 64 KB