Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Selection edges do not impede flood fill. #823

Closed
oceanhahn opened this issue Oct 6, 2015 · 4 comments
Closed

Bug: Selection edges do not impede flood fill. #823

oceanhahn opened this issue Oct 6, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@oceanhahn
Copy link

I seem to remember old versions, as recently as 1.1, treating selection edges as barriers to flood filling, but this no longer seems to be so. Did this change intentionally in 1.1.0.1? It's a bit of a hassle to have to either outline the entire selection up to internal blockages (that is, a pattern of pixels that 'dams the flood')...

I've tried a number of things in an attempt to find the source of the problem (if indeed it is one)-- playing with 'contiguous' and 'stop at grid' -- nothing seems to solve it. Was this a deliberate change? If not, something's broken.

Thanks!

@dacap
Copy link
Member

dacap commented Oct 6, 2015

Hi @oceanhahn! Flood fill should work as previous Aseprite versions by default (with Contiguous option checked). Are you working with one layer or multiple layers? The edge detection works only for the current layer (detecting edges in the current layer). If you are working with one layer, it's probable that you've found a bug.

@oceanhahn
Copy link
Author

Oh, I found what's happening.
The flood fill tool seems to be filling all of the valid pixels it can see from the unselected layer, then only filling the pixels within the selection. When the flood fill tool determines which pixels to change, it looks at everything it can "see" not including the selection boundaries.
This is different from what I would expect (and it may just be me), which is that it would evaluate only the 'flood-able' pixels within the selection-- that is, the edges of a selected area, as well as any pixels within it, act as barriers to flood-fill.

Attached are two screencaptures of flood-fill in action: the lefthand one shows a flood within a selection within a closed shape (behaving as expected): the fill only floods the interior space of the closed shape. The righthand figure shows a flood within a selection, within an open shape. When the flood evaluates which pixels to fill, it looks at the whole image and not just the pixels in the marquee. When it actually fills pixels, though, it only changes the ones in the selection. I would have expected it to stop flooding at the edge of the selection, rather than to compute every pixel and only alter the selected ones. 😗

Anyway, I don't know how hard that would be to fix, or if that's even what's going on. I hope this helps! :D
(For reference, I have multiple layers, but the fill and enclosure are both on the same one.)

(continues below image...)
11012

The outcome I want is for fill to flood the middle section of the figure, as on the left, even if the whole figure is open beyond the selection area. (Of course, if there is a gap inside the selected area, flood-fill ought to still flood through it, filling all "visible" pixels -inside- the selection!)

@oceanhahn
Copy link
Author

In short, it looks like it's flooding the unselected image, then applying just the selected portion to the view.
I would have expected it to flood the selection only, ignoring all pixels beyond the selected space, in this operation.

It also looks like an old issue, since my legacy install of 0.9.5 does exactly the same thing! :0
I've revised the issue title to reflect this.

@oceanhahn oceanhahn changed the title Bug?: Selection edges no longer halt flood fill. Bug: Selection edges do not impede flood fill. Oct 6, 2015
@dacap dacap added the bug label Oct 6, 2015
@dacap dacap added this to the v1.1 milestone Oct 6, 2015
@dacap
Copy link
Member

dacap commented Oct 6, 2015

Thanks for the great explanation! The selection should act like another edge for the flood fill. (I've checked Photoshop just out of curiosity and it works correctly 😄 )

@oceanhahn oceanhahn mentioned this issue Nov 3, 2015
15 tasks
@dacap dacap self-assigned this Nov 4, 2015
@dacap dacap closed this as completed in 4a67a96 Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants