"Neal Bridges" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
> "Todd Walk" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Does someone have an already working color fill routine >> working on Palms? (All the simple ones blow up memory >> wise.) Preferably one working with hires bitmaps. > > You want a non-recursive floodfill routine. I've written one for > Quartus Forth here: http://quartus.net/wiki/FloodFillModule > > For C, etc., you should be able to turn up multiple examples on the > web by searching specifically for a non-recursive routine. > The last time I even looked at any forth was well over 20 years ago... I already knew of the 4/8 way seed fills, and had implemented a non-recursive 4 way in about 20 min with minimal new node insertion. It works great (but slow) until it reaches a certain point, then blows up with a fatal error (caused by the point storage vector getting too large). (Note, for hires, don't use WinGetPixel, which seems to only use a lowres coord, and seems to average the colors of the four hires pixels.) I've looked for hours and haven't found any solid code for a scan line fill method. (I wish now that I had saved my implementation from a college class 15 some years ago.) About all I've found is a bunch of academic papers and other uncompleted junk. If no one has any working code, I'll probably just take a chunk of time to figure out how to do the scan line version again. Todd. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
