mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibGfx: Add missing TextAlignment::BottomLeft
This commit is contained in:
parent
8cbdcffd05
commit
9dd3203cc6
6 changed files with 19 additions and 5 deletions
|
@ -1229,6 +1229,7 @@ void draw_text_line(const IntRect& a_rect, const TextType& text, const Font& fon
|
|||
switch (alignment) {
|
||||
case TextAlignment::TopLeft:
|
||||
case TextAlignment::CenterLeft:
|
||||
case TextAlignment::BottomLeft:
|
||||
break;
|
||||
case TextAlignment::TopRight:
|
||||
case TextAlignment::CenterRight:
|
||||
|
@ -1501,6 +1502,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::BottomLeft:
|
||||
bounding_rect.set_location({ rect.x(), (rect.bottom() + 1) - bounding_rect.height() });
|
||||
break;
|
||||
case TextAlignment::BottomRight:
|
||||
bounding_rect.set_location({ (rect.right() + 1) - bounding_rect.width(), (rect.bottom() + 1) - bounding_rect.height() });
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue