1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

LibWeb: Enable bilinear blending for bitmaps

This is slower, but looks a lot nicer. :^)
This commit is contained in:
Sam Atkins 2021-09-20 19:55:40 +01:00 committed by Andreas Kling
parent 1c807410cd
commit a50f4d2fc9
3 changed files with 3 additions and 3 deletions

View file

@ -96,7 +96,7 @@ void ImageBox::paint(PaintContext& context, PaintPhase phase)
alt = image_element.src();
context.painter().draw_text(enclosing_int_rect(absolute_rect()), alt, Gfx::TextAlignment::Center, computed_values().color(), Gfx::TextElision::Right);
} else if (auto bitmap = m_image_loader.bitmap(m_image_loader.current_frame_index())) {
context.painter().draw_scaled_bitmap(enclosing_int_rect(absolute_rect()), *bitmap, bitmap->rect());
context.painter().draw_scaled_bitmap(enclosing_int_rect(absolute_rect()), *bitmap, bitmap->rect(), 1.0f, Gfx::Painter::ScalingMode::BilinearBlend);
}
}
}