From 8247dad54001d62dda1bf06e1086c18e59eaec79 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 25 Jun 2019 20:33:44 +0200 Subject: [PATCH] PaintBrush: Allow RGBA32 to use the bucket and spray tools. Eventually I'd like to do some kind of bitmap layers, and we definitely want alpha channel support then, so let's just not paint ourselves into an uncomfortable corner early on. :^) --- Applications/PaintBrush/BucketTool.cpp | 2 +- Applications/PaintBrush/SprayTool.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Applications/PaintBrush/BucketTool.cpp b/Applications/PaintBrush/BucketTool.cpp index 03cdefad28..5f0173ab4e 100644 --- a/Applications/PaintBrush/BucketTool.cpp +++ b/Applications/PaintBrush/BucketTool.cpp @@ -16,7 +16,7 @@ BucketTool::~BucketTool() static void flood_fill(GraphicsBitmap& bitmap, const Point& start_position, Color target_color, Color fill_color) { - ASSERT(bitmap.format() == GraphicsBitmap::Format::RGB32); + ASSERT(bitmap.bpp() == 32); if (target_color == fill_color) return; diff --git a/Applications/PaintBrush/SprayTool.cpp b/Applications/PaintBrush/SprayTool.cpp index 32cff16e6a..84888fb4f9 100644 --- a/Applications/PaintBrush/SprayTool.cpp +++ b/Applications/PaintBrush/SprayTool.cpp @@ -28,7 +28,7 @@ void SprayTool::paint_it() { GPainter painter(m_widget->bitmap()); auto& bitmap = m_widget->bitmap(); - ASSERT(bitmap.format() == GraphicsBitmap::Format::RGB32); + ASSERT(bitmap.bpp() == 32); m_widget->update(); const double base_radius = 15; for (int i = 0; i < 100 + (nrand() * 800); i++) {