io/system: implement Stringer on TextDirection

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
Chris Waldon
2022-10-24 10:51:56 -04:00
committed by Elias Naur
parent c67d8cde4b
commit b1942f64b0
+9
View File
@@ -34,6 +34,15 @@ func (d TextDirection) Progression() TextProgression {
return TextProgression((d & (1 << progressionShift)) >> progressionShift)
}
func (d TextDirection) String() string {
switch d {
case RTL:
return "RTL"
default:
return "LTR"
}
}
// TextAxis defines the layout axis of text.
type TextAxis byte