Files
test/source
Lukas Tönne fd651da7e5 GPv3: Fix fill tool boundary construction on thin pixel lines
Finding the boundary uses a Moore neighborhood. The algorithm iterates
over filled pixels, following pixels with empty neighbors, in clockwise
direction. For a given pixel and input direction (where the boundary is
coming from), the next neighbor is found by checking neighbors clockwise
from the previous pixel.

The last direction in this inner loop would be opposite the input
direction, i.e. if the pixel has only one neighbor it can loop back
and iterate over pixels that are already in the boundary, from the
opposite direction. However, this last direction was excluded from the
search (an earlier implementation did not support it). Using this search
direction as well allows the boundary to go back and forth over the same
line of pixels until the boundary is closed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122383
2024-05-28 17:25:35 +02:00
..