16 aarectangle rectangle;
17 std::optional<float> baseline = {};
18 std::optional<float> centerline = {};
25 [[nodiscard]]
constexpr friend bool operator==(
box_shape const&,
box_shape const&)
noexcept =
default;
27 constexpr box_shape(
extent2 size) noexcept : rectangle(size), baseline(), centerline()
35 aarectangle
const& rectangle,
36 float baseline_adjustment) noexcept :
38 baseline(make_guideline(
39 constraints.alignment.vertical(),
42 baseline_adjustment)),
43 centerline(make_guideline(
44 constraints.alignment.horizontal(),
54 hi_axiom(rectangle.size() >= constraints.minimum);
58 [[nodiscard]]
constexpr float x()
const noexcept
63 [[nodiscard]]
constexpr float y()
const noexcept
68 [[nodiscard]]
constexpr extent2 size()
const noexcept
70 return rectangle.size();
73 [[nodiscard]]
constexpr float width()
const noexcept
75 return rectangle.width();
78 [[nodiscard]]
constexpr float height()
const noexcept
80 return rectangle.height();
83 [[nodiscard]]
constexpr bool holds_invariant()
const noexcept
#define hi_axiom(expression,...)
Specify an axiom; an expression that is true.
Definition assert.hpp:253