Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!itsgw!steinmetz!uunet!iscuva!jimc From: jimc@iscuva.ISCS.COM (Jim Cathey) Newsgroups: comp.sys.mac.programmer Subject: Re: Need help on fill routine Message-ID: <2354@iscuva.ISCS.COM> Date: 14 Feb 89 03:05:52 GMT References: <1173@dogie.edu> <2403@ilium.cs.swarthmore.edu> Organization: ISC Systems Corporation, Spokane, WA Lines: 28 In article <1173@dogie.edu> yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) writes: > I need to do a pixel by pixel visit of a region for a program I'm > working on. (I don't mean "region" in the quickdraw sense really, more of > an arbitrary bitmap image). > > [Code Deleted] > > The only problem with it is it's really stack > intensive, it could blow the stack if the area to be filled is too > large. Does anybody know of an unrecursive routine that works > similarly? Thanks in advance! Check out the May 1986 issue of Computer Language magazine. They had a flood (paintbucket) routine in it that was designed to utilize a minimum of stack space (although was still recursive). There was a reasonable discussion of whats 'n whys in the article. The flooder itself was fairly slow, but that was because it was completely unoptimized. It was, however, fairly simple as presented and it wasn't too hard to soup up. It depends greatly on what you're doing during your visit. +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC Systems Corp. ! II CC ! TAF-C8; Spokane, WA 99220 ! IISSSS CC ! UUCP: uunet!iscuva!jimc ! II CCCCCC ! (509) 927-5757 +----------------+ "With excitement like this, who is needing enemas?"