mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibGfx: Handle TextAlignment::BottomRight in do_draw_text()
This commit is contained in:
parent
9103471863
commit
b1eeb15129
Notes:
sideshowbarker
2024-07-19 01:44:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b1eeb151294
1 changed files with 3 additions and 0 deletions
|
@ -1021,6 +1021,9 @@ void do_draw_text(const IntRect& rect, const TextType& text, const Font& font, T
|
|||
case TextAlignment::Center:
|
||||
bounding_rect.center_within(rect);
|
||||
break;
|
||||
case TextAlignment::BottomRight:
|
||||
bounding_rect.set_location({ (rect.right() + 1) - bounding_rect.width(), (rect.bottom() + 1) - bounding_rect.height() });
|
||||
break;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue