diff --git a/Userland/Applications/PixelPaint/Tools/BrushTool.cpp b/Userland/Applications/PixelPaint/Tools/BrushTool.cpp index 3fe39457e3b..8fb1f9abeb4 100644 --- a/Userland/Applications/PixelPaint/Tools/BrushTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/BrushTool.cpp @@ -99,7 +99,7 @@ void BrushTool::draw_point(Gfx::Bitmap& bitmap, Gfx::Color color, Gfx::IntPoint auto falloff = get_falloff(distance) * flow_scale; auto pixel_color = color; pixel_color.set_alpha(AK::min(falloff * 255, 255)); - bitmap.set_pixel(x, y, bitmap.get_pixel(x, y).blend(pixel_color)); + set_pixel_with_possible_mask(x, y, bitmap.get_pixel(x, y).blend(pixel_color), bitmap); } } } diff --git a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp index 924912b5040..315724ee04e 100644 --- a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp @@ -34,6 +34,7 @@ void EraseTool::draw_point(Gfx::Bitmap& bitmap, Gfx::Color color, Gfx::IntPoint int radius = size() / 2; Gfx::IntRect rect { point.x() - radius, point.y() - radius, size(), size() }; GUI::Painter painter(bitmap); + // FIXME: Currently this mode does not respect the editing mask if present. painter.clear_rect(rect, color); } else { for (int y = point.y() - size(); y < point.y() + size(); y++) { @@ -47,7 +48,7 @@ void EraseTool::draw_point(Gfx::Bitmap& bitmap, Gfx::Color color, Gfx::IntPoint auto old_color = bitmap.get_pixel(x, y); auto falloff = get_falloff(distance); auto new_color = old_color.interpolate(color, falloff); - bitmap.set_pixel(x, y, new_color); + set_pixel_with_possible_mask(x, y, new_color, bitmap); } } } diff --git a/Userland/Applications/PixelPaint/Tools/SprayTool.cpp b/Userland/Applications/PixelPaint/Tools/SprayTool.cpp index f249a4f736a..45750615e41 100644 --- a/Userland/Applications/PixelPaint/Tools/SprayTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/SprayTool.cpp @@ -52,7 +52,7 @@ void SprayTool::paint_it() continue; if (ypos < 0 || ypos >= bitmap.height()) continue; - bitmap.set_pixel(xpos, ypos, m_color); + set_pixel_with_possible_mask(xpos, ypos, m_color, bitmap); } layer->did_modify_bitmap(Gfx::IntRect::centered_on(m_last_pos, Gfx::IntSize(base_radius * 2, base_radius * 2)));