Path: utzoo!attcan!uunet!wyse!mips!prls!pyramid!voder!apple!tecot
From: tecot@Apple.COM (Ed Tecot)
Newsgroups: comp.sys.mac.programmer
Subject: Re: bitmap --> region
Message-ID: <13117@apple.Apple.COM>
Date: 30 Jun 88 21:48:55 GMT
References: <2958@cvl.umd.edu>
Reply-To: tecot@apple.apple.com.UUCP (Ed Tecot)
Organization: Apple Computer Inc, Cupertino, CA
Lines: 31

In article <2958@cvl.umd.edu> avjewe@cvl.umd.edu (Andrew Donaldson Jewell) writes:
>	How can I turn a bitmap into a region?
>
>	Given a bitmap, I want to get a region enclosing all
>	of the black dots and none of the white dots.

From Tech Note #193: So many BitMaps, so little time:
There is now a routine, available from Apple Software Licensing (and soon
to be in the system as a QuickDraw call), which will convert a bitmap to a
region.

A region can be constructed from a bitmap by the following function:
	FUNCTION BitMapRgn(region:RgnHandle; bMap:BitMap): OSErr;
in C:
	pascal OSErr BitMapRgn(RgnHandle region, BitMap bMap);

The region will be built so that all one bits in bMap are inside the region
and all zero bits are outside it.

[...]

To obtain a version of BitMapRgn in MPW object format which can be linked to
an MPW program, contact Software Licensing:

	Software Licensing
	Apple Computer, Inc.
	20525 Mariani Ave.  M/S 28-B
	Cupertino, CA 95014
	AppleLink: SW.License

						_emt