Update comments about PoB alignment argument

This commit is contained in:
meehl committed 2026-08-29 16:35:11 +02:00
1 parent 4b344d15ae
commit fe96786aca
1 file changed
+10 -8
+10 -8
View File
@@ -585,20 +585,22 @@ impl<'a> Iterator for PoBStringSegmentIterator<'a> {
} }
} }
// PoB's text alignment is weird // PoB's alignment argument is weird!
// It controls:
// - the alignment within the text box
// - the anchor point of the box
// - the relative/absolute positioning of the box
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
enum PoBTextAlignment { enum PoBTextAlignment {
// left-aligned, x coordinate describes top-left corner // alignment: left | anchor: top-left corner | position: relative to viewport
Left, Left,
// centered in screen space, x coordinate describes offset of text center // alignment: center | anchor: top-center | position: relative to center of screen
// from screen center. positive values of x move text to right, negative to left.
Center, Center,
// right-aligned in screen space, x coordinate describes distance from right edge // alignment: right | anchor: top-right | position: relative to right edge of screen
// of text to right edge of screen. positive values move text further to left.
Right, Right,
// makes text centered around position, i.e. position.x = horizontal center of text // alignment: center | anchor: top-center | position: relative to viewport
CenterX, CenterX,
// makes text right-aligned to position, i.e. position.x = right edge of text // alignment: right | anchor: top-right corner | position: relative to viewport
RightX, RightX,
} }