Hi all, I've created "dilating flood-fill" and I would like to pull-request it later.
That branch "fill_dilate" is here,
This feature does simple dilation, to fill spaces between contour and flood-filled area.
without this feature:
with this feature:
But, before doing pull-request, I am worried about the text of the label and tooltip of Options Presenter makes sense properly as English.
In Krita, it is shown as "Grow Selection:".
But, there is no selection in mypaint, and my code does not use selection.
so I use "Dilation Size".
And, the tooltip text is "How many pixels the filled area to be dilated."
Are they make sense in English? are there any better, plain text?
By the way, For your reference...
I also created another branch.but it is just experimental one...
Previously I planned to pull-request this if this branch work well, but it does not work well.
So I gave up it.
that branch "gapclose_fill" is here
It does "psuedo gap-closing flood-fill", in addition to "dilating flood-fill".
"psuedo" means, actually this function does nothing somewhat special vector-based gap-detecting or fantastic mathematical operations like ClipStudio or Lazybrush one.
This is simply, just dilate contour to close gap.
And after that, search clear space to flood-fill.
then, dilate the flood-filled area.
for example, there is such dashed line art... I clicked the center of that area...
flood-fill with psuedo-gap-closing feature do this:
But, It is only useful for convex area, actually rather useless...
When gap-close-flood-fill with star like shaped area, the tip part remains unpainted.
because it cannot distinguish narrowing contour and opened gap.
Using a smaller value for 'Gap Closing Radius' and use in conjection with dilation
might make it a bit better.
but there is still empty area.
So I think that this code is only useful under very limited circumstances.
I'm very weak for math, Once I have read https://github.com/mypaint/mypaint/issues/296 ,
and that Lazybrush pdf document, I cannot understand almost everything...
I hope someone will implement that Lazybrush like fill feature in future!