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

PixelPaint: Start using Editing-Masks for some tools

This patch starts to integrate the usage of Editing-Masks for the
following tools: Spray-Tool, Brush-Tool and Erase-Tool
This commit is contained in:
Torstennator 2023-05-22 10:40:02 +02:00 committed by Jelle Raaijmakers
parent 0a120e239a
commit d9d9103cbb
3 changed files with 4 additions and 3 deletions

View file

@ -52,7 +52,7 @@ void SprayTool::paint_it()
continue;
if (ypos < 0 || ypos >= bitmap.height())
continue;
bitmap.set_pixel<Gfx::StorageFormat::BGRA8888>(xpos, ypos, m_color);
set_pixel_with_possible_mask<Gfx::StorageFormat::BGRA8888>(xpos, ypos, m_color, bitmap);
}
layer->did_modify_bitmap(Gfx::IntRect::centered_on(m_last_pos, Gfx::IntSize(base_radius * 2, base_radius * 2)));