diff --git a/Userland/Libraries/LibGfx/Rect.h b/Userland/Libraries/LibGfx/Rect.h index 0c02cff68c..43b549c1e6 100644 --- a/Userland/Libraries/LibGfx/Rect.h +++ b/Userland/Libraries/LibGfx/Rect.h @@ -168,6 +168,13 @@ public: return rect; } + [[nodiscard]] Rect translated(T dboth) const + { + Rect rect = *this; + rect.translate_by(dboth); + return rect; + } + [[nodiscard]] Rect translated(Point const& delta) const { Rect rect = *this;