1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:17:44 +00:00

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:
Andreas Kling 2019-06-25 20:33:44 +02:00
parent 5cb324ee02
commit 8247dad540
2 changed files with 2 additions and 2 deletions

View file

@ -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++) {