85 constexpr inline const char* horizontal_align_names[] = {
"left",
"center",
"right",
"justify_horizontal",
"center",
"",
"",
"",
"right",
"",
"",
"",
"justify_horizontal" };
86 constexpr inline const char* vertical_align_names[] = {
"top",
"middle",
"bottom",
"justify_vertical",
"middle",
"",
"",
"",
"bottom",
"",
"",
"",
"justify_vertical" };
87 constexpr inline const char* align_names[] = {
"top_left",
"top_center",
"top_right",
"",
"middle_left",
"middle_center",
"middle_right",
"",
"bottom_left",
"bottom_center",
"bottom_right",
"",
"" };
88 constexpr inline const char* align_names_natural[] = {
"top left",
"center top",
"top right",
"",
"middle left",
"center",
"middle right",
"",
"bottom left",
"center bottom",
"bottom right",
"",
"" };
169 template <
typename T>
179 template <
typename T>
230#include "align+rec2.h"
align
Represents an alignment in both axes (horizontal and veritcal)
constexpr vertical_align vertical_aligns_in_order[]
Vertical alignments in order.
constexpr align only_vertical(align alignment)
Gets a mew align that only has the vertical component.
constexpr align rotated_counter_clockwise(align alignment)
Like rotated_clockwise but counter clockwise.
constexpr align aligns_counter_clockwise[]
Alignments in counter-clockwise order.
constexpr vertical_align vertical_from(align alignment)
Gets just the vertical component from the align (as a vertical_align)
constexpr align rotated_clockwise(align alignment)
Returns the 2D alignment rotated clockwise.
constexpr horizontal_align horizontal_from(align alignment)
Gets just the horizontal component from the align (as a horizontal_align)
vertical_align
Represents an alignment on a vertical line.
constexpr horizontal_align horizontal_aligns_in_order[]
Horizontal alignments in order.
constexpr align aligns_clockwise[]
Alignments in clockwise order.
constexpr vertical_align to_vertical(horizontal_align alignment)
Returns alignment as if it was on a vertical line.
constexpr align operator|(horizontal_align first, vertical_align second)
You can use the | operator to create an align from a horizontal_align and a vertical_align.
constexpr const char * to_natural_name(align a)
Get natural alignment name.
constexpr const char * to_name(horizontal_align h)
Get alignment name.
constexpr align aligns_in_order[]
Alignments in order, first left-to-right, then top-to-bottom.
constexpr align only_horizontal(align alignment)
Gets a mew align that only has the horizontal component.
constexpr horizontal_align to_horizontal(vertical_align alignment)
Returns alignment as if it was on a horizontal line.
constexpr vertical_align to_opposite(vertical_align alignment)
Returns the opposite aligment.
constexpr auto bit_count
Equal to the number of bits in the type.
The below code is based on Sun's libm library code, which is licensed under the following license:
Primary namespace for everything in this library.
@ bottom_center
Bottom center.
@ bottom_left
Bottom left.
@ middle_left
Middle left.
@ bottom_right
Bottom right.
@ middle_center
Middle center.
@ middle_right
Middle right.