Diffusion Krita b405a261b3db

Add 'selection as a border' option to Fill Tool

Authored by tymond on Jun 22 2020, 11:21 PM.

Description

Add 'selection as a border' option to Fill Tool

Before this commit, Krita could only respect the selection after
the fill tool already filled the paint device. This commit adds
an option to consider the selection before filling, so that
selection borders become borders for the fill tool as well.

Mechanism it uses:

  • while wandering over the reference paint device, it wanders on

the selection paint device as well

  • checks the value on the selection paint device
  • if it's zero, it returns that this is outside of the fill area,

so the scanline algorithm doesn't go further

This mode is around 35% slower than the standard mode provided that
the whole paint device is selected. In usual cases where the user would
want to use this mode it should make the filling faster,
because it actively prevents scanline to go any further than the selection,
which isn't the case when the standard mode is used.

Details

Committed
tymondJun 22 2020, 11:21 PM
Parents
R37:4764f1f9096a: Add a warning label in file layer dialog
Branches
Unknown
Tags
Unknown
References
refs/keep-around/b405a261b3db2c97214c1e684476ecf2f9ec0a1f