17 std::optional<int> baseline = {};
18 std::optional<int> centerline = {};
25 [[nodiscard]]
constexpr friend bool operator==(
box_shape const&,
box_shape const&)
noexcept =
default;
27 constexpr box_shape(
extent2i size) noexcept : rectangle(size), baseline(), centerline() {}
33 int baseline_adjustment) noexcept :
35 baseline(make_guideline(
36 constraints.alignment.vertical(),
39 constraints.padding.bottom(),
40 constraints.padding.top(),
41 baseline_adjustment)),
42 centerline(make_guideline(
43 constraints.alignment.horizontal(),
46 constraints.padding.left(),
47 constraints.padding.right()))
54 hi_axiom(rectangle.size() >= constraints.minimum);
61 int baseline_adjustment) noexcept :
62 box_shape(
override_t{}, constraints, narrow_cast<aarectanglei>(rectangle), baseline_adjustment)
69 int baseline_adjustment) noexcept :
70 box_shape(constraints, narrow_cast<aarectanglei>(rectangle), baseline_adjustment)
74 [[nodiscard]]
constexpr int x()
const noexcept
79 [[nodiscard]]
constexpr int y()
const noexcept
84 [[nodiscard]]
constexpr extent2i size()
const noexcept
86 return rectangle.size();
89 [[nodiscard]]
constexpr int width()
const noexcept
91 return rectangle.width();
94 [[nodiscard]]
constexpr int height()
const noexcept
96 return rectangle.height();
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:253