21template <
typename DataType>
32 return size.width > 0 &&
size.height > 0;
44template <
typename DataType>
48 return lhs.origin == rhs.origin && lhs.size == rhs.size;
51template <
typename DataType>
59template <
typename To,
typename From>
62 return { point_cast<To>(rect.
origin), size_cast<To>(rect.
size) };
bool operator==(PointType< DataType > lhs, PointType< DataType > rhs) noexcept
RectType< To > rect_cast(RectType< From > rect)
Cast the rectangle to another data type.
bool operator!=(PointType< DataType > lhs, PointType< DataType > rhs) noexcept
Rectangle that is defined by the top left corner and the size.
PointType< DataType > origin
Origin of the rectangle.
SizeType< DataType > size
Size of the rectangle.
bool Contains(PointType< DataType > pt) const noexcept
Return true if the rectangle contains the point specified.
bool IsValid() const noexcept
Return true if the rectangle is not empty.
A class that represents size in 2D space.