1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

PixelPaint: Add action to invert selection

This commit is contained in:
snooze6214 2022-10-18 20:24:00 +05:30 committed by Linus Groh
parent 295fcd639f
commit d3353ee0e7
6 changed files with 16 additions and 0 deletions

View file

@ -22,6 +22,13 @@ void Selection::clear()
client->selection_did_change();
}
void Selection::invert()
{
auto new_mask = Mask::full(m_image.rect());
new_mask.subtract(m_mask);
m_mask = new_mask;
}
void Selection::merge(Mask const& mask, MergeMode mode)
{
switch (mode) {