11#include "../utility/utility.hpp"
12#include "../macros.hpp"
17namespace hi {
inline namespace v1 {
236 return resolve(
mirror(rhs, left_to_right), left_to_right);
253 _value((std::to_underlying(v) << 4) | std::to_underlying(t))
255 hi_axiom(std::to_underlying(v) <= 0xf);
256 hi_axiom(std::to_underlying(t) <= 0xf);
260 _value((std::to_underlying(v) << 4) | std::to_underlying(h))
262 hi_axiom(std::to_underlying(v) <= 0xf);
263 hi_axiom(std::to_underlying(h) <= 0xf);
345 return lhs.horizontal() == rhs;
350 return lhs == rhs.horizontal();
355 return lhs.vertical() == rhs;
360 return lhs == rhs.vertical();
365 return alignment{mirror(rhs.horizontal()), rhs.vertical()};
370 return alignment{mirror(rhs.horizontal(), left_to_right), rhs.vertical()};
375 return alignment{resolve(rhs.horizontal(), left_to_right), rhs.vertical()};
380 return alignment{resolve_mirror(rhs.horizontal(), left_to_right), rhs.vertical()};
vertical_alignment
Vertical alignment.
Definition alignment.hpp:22
constexpr std::optional< float > make_guideline(vertical_alignment alignment, float bottom, float top, float padding_bottom, float padding_top, float guideline_width)
Create a guideline between two points.
Definition alignment.hpp:60
horizontal_alignment
Horizontal alignment.
Definition alignment.hpp:103
@ middle
Align to the vertical-middle.
@ bottom
Align to the bottom.
@ right
Align the text to the right side.
@ left
Align the text to the left side.
@ flush
Align the text naturally based on the writing direction of each paragraph.
@ justified
Stretch the text to be flush to both sides.
@ center
Align the text in the center.
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr horizontal_alignment mirror(horizontal_alignment const &rhs) noexcept
Mirror the horizontal alignment.
Definition alignment.hpp:203
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
Horizontal/Vertical alignment combination.
Definition alignment.hpp:242