1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibGfx: Avoid rounding/truncating glyph positions till blitting

This keeps some overloads that accept ints to avoid adding calls to
.to_type<float>() all over the place.
This commit is contained in:
MacDue 2023-01-01 19:42:00 +01:00 committed by Andreas Kling
parent 68f678f566
commit a1726b1ba5
14 changed files with 172 additions and 106 deletions

View file

@ -213,7 +213,7 @@ Gfx::Font const& ScreenNumberOverlay::font()
void ScreenNumberOverlay::render_overlay_bitmap(Gfx::Painter& painter)
{
painter.draw_text({ {}, rect().size() }, DeprecatedString::formatted("{}", m_screen.index() + 1), font(), Gfx::TextAlignment::Center, Color::White);
painter.draw_text(Gfx::IntRect { {}, rect().size() }, DeprecatedString::formatted("{}", m_screen.index() + 1), font(), Gfx::TextAlignment::Center, Color::White);
}
Gfx::IntRect ScreenNumberOverlay::calculate_content_rect_for_screen(Screen& screen)
@ -264,7 +264,7 @@ void WindowGeometryOverlay::update_rect()
void WindowGeometryOverlay::render_overlay_bitmap(Gfx::Painter& painter)
{
painter.draw_text({ {}, rect().size() }, m_label, WindowManager::the().font(), Gfx::TextAlignment::Center, Color::White);
painter.draw_text(Gfx::IntRect { {}, rect().size() }, m_label, WindowManager::the().font(), Gfx::TextAlignment::Center, Color::White);
}
void WindowGeometryOverlay::window_rect_changed()