On 22 March 2012 17:54, Torbjörn Rathsman <torm...@telia.com> wrote:
> I do not know how the floodfill decide if it comes to a boundary or not, but
> I guess that it always sampels information from the point where I clicked.
> However, sometimes another test would be more useful. This piece of code is
> polymorphic in boundary check:
>
> One way to implement FloodfillConditionBoundary besides the traditional one
> is to check the magnitude of the gradient vector at current pixel. This
> would be useful if one has a picture with a smooth gradient surrounded by a
> sharp edge and want to replace the smooth gradient with one solid color. If
> I want to add the feature myself, where do I start?

Clone the gimp git repo, find the code that does flood filling, modify
it to add your method and figure out how to add the option to the gui
and pass it down to that layer. Files that would be interesting
include,
app/tools/gimpbucketfilltool.c
app/core/gimpimage-contiguous-region.c
app/core/gimpdrawable-bucket-fill.c

It's funny, I thought about this exact thing today.

-- 
Mikael Magnusson
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

Reply via email to