77 constexpr alignment() noexcept : _value(0) {}
83 constexpr explicit alignment(uint8_t value) noexcept : _value(value) {}
86 _value((to_underlying(v) << 4) | to_underlying(t))
93 _value((to_underlying(v) << 4) | to_underlying(t))
99 [[nodiscard]]
static constexpr alignment top_flush()
noexcept
101 return {horizontal_alignment::flush, vertical_alignment::top};
104 [[nodiscard]]
static constexpr alignment top_left()
noexcept
106 return {horizontal_alignment::left, vertical_alignment::top};
109 [[nodiscard]]
static constexpr alignment top_center()
noexcept
111 return {horizontal_alignment::center, vertical_alignment::top};
114 [[nodiscard]]
static constexpr alignment top_justified()
noexcept
116 return {horizontal_alignment::justified, vertical_alignment::top};
119 [[nodiscard]]
static constexpr alignment top_right()
noexcept
121 return {horizontal_alignment::right, vertical_alignment::top};
124 [[nodiscard]]
static constexpr alignment middle_flush()
noexcept
126 return {horizontal_alignment::flush, vertical_alignment::middle};
129 [[nodiscard]]
static constexpr alignment middle_left()
noexcept
131 return {horizontal_alignment::left, vertical_alignment::middle};
134 [[nodiscard]]
static constexpr alignment middle_center()
noexcept
136 return {horizontal_alignment::center, vertical_alignment::middle};
139 [[nodiscard]]
static constexpr alignment middle_justified()
noexcept
141 return {horizontal_alignment::justified, vertical_alignment::middle};
144 [[nodiscard]]
static constexpr alignment middle_right()
noexcept
146 return {horizontal_alignment::right, vertical_alignment::middle};
149 [[nodiscard]]
static constexpr alignment bottom_left()
noexcept
151 return {horizontal_alignment::left, vertical_alignment::bottom};
154 [[nodiscard]]
static constexpr alignment bottom_center()
noexcept
156 return {horizontal_alignment::center, vertical_alignment::bottom};
159 [[nodiscard]]
static constexpr alignment bottom_right()
noexcept
161 return {horizontal_alignment::right, vertical_alignment::bottom};
174 [[nodiscard]]
constexpr friend bool operator==(
alignment const &lhs,
alignment const &rhs)
noexcept =
default;
178 return lhs.text() == rhs;
183 return lhs == rhs.text();
188 return lhs.vertical() == rhs;
193 return lhs == rhs.vertical();
198 return alignment{mirror(rhs.text()), rhs.vertical()};
#define hi_axiom(expression)
Specify an axiom; an expression that is true.
Definition assert.hpp:133
constexpr alignment operator|(horizontal_alignment lhs, vertical_alignment rhs) noexcept
Combine vertical and horizontal alignment.
Definition alignment.hpp:216