
looking for interior floodfill routine... without border color
I'm using BC 3.1 and I'm using the turbo graphics functions to write a simple
paint program. I'm satisifed with the turbo functions but the only problem
is the floodfill() routine. It requires a border color value. I made it
search the line for the first pixel thats different and I use that for the
border color. The only problem is when one of the sides of the shape being
filled is a different color. This is why I need a routine that fills until
it runs into any pixel DIFFERENT from the seed pixel. There seems to be
no turbo function to do this. Does anyone know where I can find a good
function like this? Ilooked at a bunch of libraries like Megagraph and
a few others but I don't wanna use a totally new library now that I've come
so far with the turbo functions in my program. Also, all the libraries I
ran into weren't quite good enough. One required 386 mode... I just need
this one function.
Also: I figured I'd minimize the damage of a fill escaping the shape by
using a viewport --setport() to restirct it to only the drawing window.
This seemed to have no effect... When the fill escapes the shape, it ends
upnot only doing the whole screen but it starts doing crazy stuff and crashes
the whole system. Any idea why?
plesae e-mail me or post here...