mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:27:34 +00:00
PixelPaint: Introduce new mask features
This patch adds a new Editing-Mask type to layers. This kind of mask is used to restrict changes on the content bitmap only to areas where the mask is drawn. The intensity of a pixel change is controlled by the alpha-value of the mask. Furthermore a function to invert and clear masks has been introduced. When a new mask is created for a layer the edit mode of the layer is also changed to Mask so that the user can immediately start to draw the mask.
This commit is contained in:
parent
7e5f1fa895
commit
e3509efc1b
6 changed files with 147 additions and 7 deletions
|
@ -101,6 +101,10 @@ protected:
|
|||
|
||||
GUI::AbstractSlider* m_primary_slider { nullptr };
|
||||
GUI::AbstractSlider* m_secondary_slider { nullptr };
|
||||
|
||||
template<Gfx::StorageFormat>
|
||||
void set_pixel_with_possible_mask(int x, int y, Gfx::Color color, Gfx::Bitmap& bitmap);
|
||||
void set_pixel_with_possible_mask(int x, int y, Gfx::Color color, Gfx::Bitmap& bitmap);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue