Path: utzoo!attcan!uunet!decwrl!wuarchive!kuhub.cc.ukans.edu!2fluluck From: 2fluluck@kuhub.cc.ukans.edu Newsgroups: comp.lang.pascal Subject: Re: TP5.5 FloodFill Message-ID: <26000.27107db4@kuhub.cc.ukans.edu> Date: 8 Oct 90 18:23:00 GMT References: Organization: University of Kansas Academic Computing Services Lines: 26 In article , clong@emerald.rutgers.edu (Chris Long) writes: > Has anyone else had problems with TP5.5's FloodFill? I do a > [stuff deleted] > It draws the grid nicely and does the first set of fills, but the > next set of fills does nothing. > > -Chris I've had a few problems with the FloodFill procedure. It works fine as long as you are using solid fills, but if you are doing fills with patterns, it gets goofy. This is due to the algorithm that Turbo uses (if there aren't any changes in one direction in x number of pixels, it abandons that path). This can result in only part of the area being filled. The way I solved this is to FloodFill the area with a solid pattern, then FloodFill it again with the pattern or whatever you need. This is dependant upon the particular image being played with, so you may have to do several solid fills from different locations within the area in order for it to work. Of course, if worst comes to worst, you could just write your own FloodFill-type routine in Turbo using GetPixel and PutPixel. That is how I originally did it, but it is simply too slow that way (at least for me). Steve Penrod University of Kansas