LibGfx: Add missing TextAlignment::BottomLeft

This commit is contained in:
Linus Groh 2021-05-21 01:03:02 +01:00 committed by Andreas Kling
commit 9dd3203cc6
Notes: sideshowbarker 2024-07-18 17:39:20 +09:00
6 changed files with 19 additions and 5 deletions

View file

@ -114,6 +114,10 @@ void Rect<T>::align_within(const Rect<T>& other, TextAlignment alignment)
set_x(other.x() + other.width() - width());
center_vertically_within(other);
return;
case TextAlignment::BottomLeft:
set_x(other.x());
set_y(other.y() + other.height() - height());
return;
case TextAlignment::BottomRight:
set_x(other.x() + other.width() - width());
set_y(other.y() + other.height() - height());