mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
PixelPaint: Ensure the selection is always within image bounds
This commit is contained in:
parent
fc137a7827
commit
f132751fae
8 changed files with 97 additions and 55 deletions
|
@ -31,6 +31,8 @@ void Selection::invert()
|
|||
|
||||
void Selection::merge(Mask const& mask, MergeMode mode)
|
||||
{
|
||||
VERIFY(m_image.rect().contains(mask.bounding_rect()));
|
||||
|
||||
switch (mode) {
|
||||
case MergeMode::Set:
|
||||
m_mask = mask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue