1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:17:35 +00:00

PixelPaint: Support saving/loading masks to project file

This commit is contained in:
Tobias Christiansen 2022-03-08 23:23:20 +01:00 committed by Andreas Kling
parent 0dd5f5672c
commit 51be2283f5
3 changed files with 17 additions and 2 deletions

View file

@ -148,6 +148,12 @@ void Layer::set_content_bitmap(NonnullRefPtr<Gfx::Bitmap> bitmap)
update_cached_bitmap();
}
void Layer::set_mask_bitmap(NonnullRefPtr<Gfx::Bitmap> bitmap)
{
m_mask_bitmap = move(bitmap);
update_cached_bitmap();
}
void Layer::update_cached_bitmap()
{
if (!is_masked()) {