over the last few days I've been desperately trying to find a working floodfill algorithm. Of the many algorithms i've tried only the 'recursive line fill' one behaves exactly as it should with the major caveat that it occasionally blows the stack. :(
I have tried many non-recursive implementations I've found on various websites and they have all been exceptionally tempermental: either they leave gaps in strange places, or flood the whole area (when they should be enclosed). I have also tried my hand at implementing a few of these algorithms myself but with limited success. I am at the point now where i really just need some working sourcecode! If anyone has a NON-recursive floodfill written in C (or c++ that isn't too heavily OOP and i can disentangle easily enough) can they PLEASE share it with me? I am at the stage now where I need it fairly urgently and certainly cannnot spend anymore time on this. :(
sorry to be a dork and ask for the sourcecode but I've hit a bit of a dead-end.
Thanks in advance if you can help!