24#ifndef JAU_RECTI2F_HPP_
25#define JAU_RECTI2F_HPP_
42 std::enable_if_t<std::is_integral_v<Value_type>,
bool> =
true>
61 : m_x(0), m_y(0), m_width(0), m_height(0) {}
76 constexpr
bool operator==(const
RectI& rhs ) const noexcept {
80 return m_x == rhs.m_x && m_y == rhs.m_y &&
81 m_width == rhs.m_width &&
82 m_height == rhs.m_height;
91 { m_x =
x; m_y =
y; m_width =
width; m_height=
height;
return *
this; }
95 { m_x = xywh[0]; m_y = xywh[1]; m_width = xywh[2]; m_height= xywh[3];
return *
this; }
99 { xywh[0] = m_x; xywh[1] = m_y; xywh[2] = m_width; xywh[3] = m_height;
return xywh; }
113 return 0 == m_width || 0 == m_height;
121 std::enable_if_t<std::numeric_limits<T>::is_integer,
bool> =
true>
123 return out << v.toString();
127 static_assert(
alignof(int) ==
alignof(
Recti));
128 static_assert(
sizeof(int)*4 ==
sizeof(
Recti));
Rectangle with x, y, width and height integer components.
constexpr value_type y() const noexcept
constexpr RectI(const value_type xywh[]) noexcept
iterator get(iterator xywh) const noexcept
xywh = this, returns xywh.
constexpr RectI & set(const_iterator xywh) noexcept
this = xywh, returns this.
const value_type & const_reference
std::string toString() const noexcept
constexpr void setHeight(const value_type height) noexcept
constexpr RectI & set(const value_type x, const value_type y, const value_type width, const value_type height) noexcept
TODO constexpr bool operator<=>(const Recti_t& rhs ) const noexcept { return ... }.
constexpr RectI & operator=(RectI &&) noexcept=default
constexpr RectI(const RectI &o) noexcept=default
constexpr value_type height() const noexcept
constexpr value_type x() const noexcept
constexpr bool is_zero() const noexcept
Return true if area is zero.
const value_type * const_iterator
constexpr RectI & operator=(const RectI &) noexcept=default
constexpr void setX(const value_type x) noexcept
constexpr void setY(const value_type y) noexcept
constexpr void setWidth(const value_type width) noexcept
constexpr RectI(RectI &&o) noexcept=default
constexpr RectI(const value_type x, const value_type y, const value_type width, const value_type height) noexcept
constexpr RectI() noexcept
const value_type * const_pointer
constexpr value_type width() const noexcept
std::string to_string(const alphabet &v) noexcept
std::ostream & operator<<(std::ostream &out, const Matrix4< T > &v) noexcept