+ * @brief How the text should be aligned when scrolling the text.
+ *
+ * 0.0f aligns the text to the left, 1.0f aligns the text to the right.
+ * The final alignment depends on three factors:
+ * 1) The alignment value of the text label (Use Text::Layout::HorizontalAlignment enumerations).
+ * 2) The text direction, i.e. whether it's LTR or RTL (0 = LTR, 1 = RTL).
+ * 3) Whether the text is greater than the size of the control ( 0 = Text width <= Control width, 1 = Text width > Control width ).
+ */
+const float ALIGNMENT_TABLE[ Text::Layout::HORIZONTAL_ALIGN_COUNT ][ 2 ][ 2 ] =
+{
+ // HORIZONTAL_ALIGN_BEGIN
+ {
+ { // LTR
+ 0.0f, // Text width <= Control width
+ 0.0f // Text width > Control width
+ },
+ { // RTL
+ 1.0f, // Text width <= Control width
+ 1.0f // Text width > Control width
+ }
+ },
+
+ // HORIZONTAL_ALIGN_CENTER
+ {
+ { // LTR
+ 0.5f, // Text width <= Control width
+ 0.0f // Text width > Control width
+ },
+ { // RTL
+ 0.5f, // Text width <= Control width
+ 1.0f // Text width > Control width
+ }
+ },
+
+ // HORIZONTAL_ALIGN_END
+ {
+ { // LTR
+ 1.0f, // Text width <= Control width
+ 0.0f // Text width > Control width
+ },
+ { // RTL
+ 0.0f, // Text width <= Control width
+ 1.0f // Text width > Control width
+ }
+ }
+};
+
+/**