mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
LibGfx: Add Rect::translated(dboth)
This corresponds to the current in place Rect::translate_by(dboth).
This commit is contained in:
parent
5080126095
commit
d140d0f880
1 changed files with 7 additions and 0 deletions
|
@ -168,6 +168,13 @@ public:
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] Rect<T> translated(T dboth) const
|
||||||
|
{
|
||||||
|
Rect<T> rect = *this;
|
||||||
|
rect.translate_by(dboth);
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
[[nodiscard]] Rect<T> translated(Point<T> const& delta) const
|
[[nodiscard]] Rect<T> translated(Point<T> const& delta) const
|
||||||
{
|
{
|
||||||
Rect<T> rect = *this;
|
Rect<T> rect = *this;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue