🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #40754

Re: Regions

#40754
From: Nick Jackiw
Date: Wed, 12 Apr 1989 15:08
40 lines
2014 bytes
In article <1324@gwusun.gwu.edu> sc258202@gwusun.gwu.edu (fortin robert e) writes:
> Is there anybody out there who has written
> a program in C that can generate a region
> given a bitmap which works in an edge-traversal
> fashion.

I think Apple licenses a trap subroutine of the form

	FUNCTION BitMapRgn(region:RgnHandle; theBits:BitMap): OSErr;

which might do what you want.  Actually, I think it generates a region
such that ALL zero points in the bitmap are excluded from the region. 
This means if your bitmap has holes in it, they'll be cropped out of
the region. (This may or may not be what you want.)

At any rate, don't be afraid to write to them. Their prices are quite
reasonable, especially (I think) for non-commercial development. They're
at:
	Software Licensing / Apple Computer
	20525 Mariani Ave MS 28-B
	Cupertino, CA 95014
	AppleLink: SW.License

-----------

Alternately, if you want only the outer-periphery of your bitmap and
no interior holes,  the algorithm should be rather trivial to write as
a general "raster-scan polygon" sort of deal.  E-mail me for further
details.

Hope this helps.

> ...The Mann\x


-- 
     _  _|\____    Nick Jackiw | Visual Geometry Project | Math Department
   / /_/   O>  \   ------------+-------------------------+ Swarthmore College
   |       O>   |  215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081
    \_Guernica_/   ------------+-------------------------+                 USA
Technical Details
Message-ID: <2671@carthage.cs.swarthmore.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!labrea!rutgers!cbmvax!vu-vlsi!swatsun!jackiw
References: <1324@gwusun.gwu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!labrea!rutgers!cbmvax!vu-vlsi!swatsun!jackiw
From: jackiw@cs.swarthmore.edu (Nick Jackiw)
Newsgroups: comp.sys.mac
Subject: Re: Regions
Keywords: Making regions out of bitmaps
Message-ID: <2671@carthage.cs.swarthmore.edu>
Date: 12 Apr 89 15:08:19 GMT
References: <1324@gwusun.gwu.edu>
Reply-To: jackiw@carthage.UUCP (Nick Jackiw)
Distribution: na
Organization: Visual Geometry Project, Swarthmore College, PA
Lines: 40