mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-02 19:44:27 +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:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user