|
Post by Ildûrest on Mar 9, 2005 9:44:29 GMT
I challenge you to make a decent flood fill algorithm that does not use recursion. (I.e. Any pixel that can be connected to the specified pixel through a path of pixels that are all the same colour as the specified pixel becomes the new Fill colour. And no SUB can call itself in this process.)
You'll definitely need some kind of temporary storage, to remember places to come back to later.
I made one of these myself and the approach I used involves remembering any pixels that would be "blocked off" in an array. Whenever it is ready to go to stop and go to another pixel, it finds one from the array and starts processing it.
|
|