mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
PixelPaint: Add action to invert selection
This commit is contained in:
parent
295fcd639f
commit
d3353ee0e7
Notes:
sideshowbarker
2024-07-19 17:02:32 +09:00
Author: https://github.com/snooze6214
Commit: d3353ee0e7
Pull-request: https://github.com/SerenityOS/serenity/pull/15684
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/davidot ✅
6 changed files with 16 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue