flood fills



I've almost finished the first Linux beta version of my application
(ported from the Amiga), and the final thing I need is a function to flood
fill a demarcated region of somewhat arbitrary shape in a drawing area.

The Amiga has/had a built in function to flood fill a bounded region in a
window with a user-specified color, the input being the RastPort ID and
the screen coordinates of a point within the region.  It worked
wonderfully, even for the most bizarre and convoluted shapes I tried it
on.  Unfortunately I don't have the algorithm it used.

The closest analog I can find in Gtk is to specify a flood fill flag when
drawing a closed figure using a set of points, but nothing about filling
an already-drawn figure.

Is there a Gtk function that I've missed that will do this?

In the absence of such a Gtk function I've written my own rather
unsophisticated function to do it, but it doesn't completely fill regions
of arbitrary shape in one swell foop the way the Amiga did.

Thanks,

Bryan


*---------------------------------------------------------------
* Bryan Brown      <*>              bbrown radix net
* http://www.radix.net/~bbrown
*---------------------------------------------------------------




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]