LibGfx: Add TextAlignment::BottomRight

This commit is contained in:
Peter Elliott 2020-08-21 08:52:39 -06:00 committed by Andreas Kling
parent 23a43d10f3
commit 28db3cd5ef
Notes: sideshowbarker 2024-07-19 03:16:48 +09:00
3 changed files with 10 additions and 0 deletions

View file

@ -134,6 +134,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::BottomRight:
set_x(other.x() + other.width() - width());
set_y(other.y() + other.height() - height());
return;
}
}