mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibGUI: Use BoxSampling to draw thumbnails
This commit is contained in:
parent
a3d48319fe
commit
66f52d6db9
Notes:
sideshowbarker
2024-07-16 22:51:10 +09:00
Author: https://github.com/LucasChollet
Commit: 66f52d6db9
Pull-request: https://github.com/SerenityOS/serenity/pull/22757
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -732,7 +732,7 @@ static ErrorOr<NonnullRefPtr<Gfx::Bitmap>> render_thumbnail(StringView path)
|
|||
auto destination = Gfx::IntRect(0, 0, (int)(bitmap->width() * scale), (int)(bitmap->height() * scale)).centered_within(thumbnail->rect());
|
||||
|
||||
Painter painter(thumbnail);
|
||||
painter.draw_scaled_bitmap(destination, *bitmap, bitmap->rect());
|
||||
painter.draw_scaled_bitmap(destination, *bitmap, bitmap->rect(), 1.f, Painter::ScalingMode::BoxSampling);
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue