LibGfx: Handle TextAlignment::BottomRight in do_draw_text()

This commit is contained in:
Andreas Kling 2020-10-25 11:50:38 +01:00
parent 9103471863
commit b1eeb15129

View file

@ -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();
}