mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
PixelPaint: Add "Delete Mask" action
This commit adds a "Delete Mask" action which deletes the active layer mask. The option is only displayed if the active layer is masked.
This commit is contained in:
parent
d66f143fb7
commit
062c9efa88
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/tcl3
Commit: 062c9efa88
Pull-request: https://github.com/SerenityOS/serenity/pull/17611
4 changed files with 55 additions and 8 deletions
|
@ -317,6 +317,13 @@ ErrorOr<void> Layer::create_mask()
|
|||
return {};
|
||||
}
|
||||
|
||||
void Layer::delete_mask()
|
||||
{
|
||||
m_mask_bitmap = nullptr;
|
||||
set_edit_mode(EditMode::Content);
|
||||
update_cached_bitmap();
|
||||
}
|
||||
|
||||
Gfx::Bitmap& Layer::currently_edited_bitmap()
|
||||
{
|
||||
switch (edit_mode()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue