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

LibGfx: Rename 32-bit bitmap StorageFormats to BGRA8888 and BGRx8888

This commit is contained in:
Andreas Kling 2021-03-16 12:00:43 +01:00
parent e0f32626bc
commit 5023331726
4 changed files with 21 additions and 21 deletions

View file

@ -70,11 +70,11 @@ static void flood_fill(Gfx::Bitmap& bitmap, const Gfx::IntPoint& start_position,
while (!queue.is_empty()) {
auto position = queue.dequeue();
auto pixel_color = bitmap.get_pixel<Gfx::StorageFormat::RGBA32>(position.x(), position.y());
auto pixel_color = bitmap.get_pixel<Gfx::StorageFormat::BGRA8888>(position.x(), position.y());
if (color_distance_squared(pixel_color, target_color) > threshold_normalized_squared)
continue;
bitmap.set_pixel<Gfx::StorageFormat::RGBA32>(position.x(), position.y(), fill_color);
bitmap.set_pixel<Gfx::StorageFormat::BGRA8888>(position.x(), position.y(), fill_color);
if (position.x() != 0)
queue.enqueue(position.translated(-1, 0));