diff options
Diffstat (limited to 'Libraries/LibGfx/FloatRect.h')
-rw-r--r-- | Libraries/LibGfx/FloatRect.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibGfx/FloatRect.h b/Libraries/LibGfx/FloatRect.h index 4b08043db2..39caf90e03 100644 --- a/Libraries/LibGfx/FloatRect.h +++ b/Libraries/LibGfx/FloatRect.h @@ -56,6 +56,11 @@ public: { } + explicit FloatRect(const Rect& other) + : FloatRect((FloatPoint)other.location(), (FloatSize)other.size()) + { + } + bool is_null() const { return width() == 0 && height() == 0; |