Important: The information in this document is obsolete and should not be used for new development.
BitMapToRegion
You can use theBitMapToRegionfunction 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
BitMaporPixMaprecord.bMap- A
BitMaporPixMaprecord.DESCRIPTION
TheBitMapToRegionfunction converts a givenBitMaporPixMaprecord to a region. You would generally use this region later for drawing operations. Theregionparameter must be a valid region handle created with theNewRgnfunction (described in the chapter "QuickDraw Drawing"). The old region contents are lost.The
bMapparameter may be either aBitMaporPixMaprecord. If you pass aPixMaprecord, 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