diff --git a/Libraries/LibGfx/Size.h b/Libraries/LibGfx/Size.h index 01ab09c01c..09d15db3a4 100644 --- a/Libraries/LibGfx/Size.h +++ b/Libraries/LibGfx/Size.h @@ -68,6 +68,12 @@ public: void set_width(T w) { m_width = w; } void set_height(T h) { m_height = h; } + template + bool contains(const Size& other) const + { + return other.m_width <= m_width && other.m_height <= m_height; + } + bool operator==(const Size& other) const { return m_width == other.m_width && m_height == other.m_height;