1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:47:44 +00:00

PixelPaint: Keep track of and expose the type of the edited bitmap

This can be either the content bitmap or the mask bitmap.
This commit is contained in:
Tobias Christiansen 2022-03-07 22:36:19 +01:00 committed by Andreas Kling
parent a180b5f442
commit 96829565d8
2 changed files with 33 additions and 0 deletions

View file

@ -74,6 +74,16 @@ public:
bool is_masked() { return !m_mask_bitmap.is_null(); }
enum class EditMode {
Content,
Mask,
};
EditMode edit_mode() { return m_edit_mode; }
void set_edit_mode(EditMode mode);
Gfx::Bitmap& currently_edited_bitmap();
private:
Layer(Image&, NonnullRefPtr<Gfx::Bitmap>, String name);
@ -90,6 +100,8 @@ private:
int m_opacity_percent { 100 };
EditMode m_edit_mode { EditMode::Content };
void update_cached_bitmap();
};