forked from pencil2d/pencil
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize flood fill of when expanding the target image
This treats everything outside the minimally bounded target image as a single region (which it is). compareColor only needs to be called once, and if it's true, then all of the transparent "border" region can be filled at once. Ideally this would be done with a rectangular fill with a mask when creating replaceImage, but unforunately that information needs to be present in filledPixels if expandFill is run. Thankfull this is pretty fast anyway.
- Loading branch information
1 parent
ab4b5c4
commit 8c0fabf
Showing
2 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters