44 return (_width > 0) && (_height > 0);
78 return _width * _height;
83 return std::to_string(_width) +
"x" + std::to_string(_height);
Dynamic array container wrapping std::vector.
Definition list.h:40
Two-dimensional size (width and height).
Definition size2d.h:34
void setHeight(const T &val)
Sets the height.
Definition size2d.h:66
T area() const
Returns the area (width * height).
Definition size2d.h:77
const T & height() const
Returns the height.
Definition size2d.h:72
void set(const T &w, const T &h)
Sets both width and height.
Definition size2d.h:48
const T & width() const
Returns the width.
Definition size2d.h:61
~Size2DTemplate()
Destructor.
Definition size2d.h:40
String toString() const
Returns the size as a string in "WxH" format.
Definition size2d.h:82
Size2DTemplate(const T &width=0, const T &height=0)
Constructs a 2D size with the given width and height, defaulting to 0x0.
Definition size2d.h:37
void setWidth(const T &val)
Sets the width.
Definition size2d.h:55
bool pointIsInside(const Point< N, 2 > &p) const
Returns true if the given 2D point lies within the size bounds.
Definition size2d.h:92
bool isValid() const
Returns true if both width and height are greater than zero.
Definition size2d.h:43
Encoding-aware string class with copy-on-write semantics.
Definition string.h:35
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19