mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibGfx: Handle TextAlignment::BottomRight in do_draw_text()
This commit is contained in:
parent
9103471863
commit
b1eeb15129
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:
|
case TextAlignment::Center:
|
||||||
bounding_rect.center_within(rect);
|
bounding_rect.center_within(rect);
|
||||||
break;
|
break;
|
||||||
|
case TextAlignment::BottomRight:
|
||||||
|
bounding_rect.set_location({ (rect.right() + 1) - bounding_rect.width(), (rect.bottom() + 1) - bounding_rect.height() });
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue