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. :^)
This commit is contained in:
parent
5cb324ee02
commit
8247dad540
Notes:
sideshowbarker
2024-07-19 13:29:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8247dad5400
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue