diff options
Diffstat (limited to 'SharedGraphics/Point.h')
-rw-r--r-- | SharedGraphics/Point.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SharedGraphics/Point.h b/SharedGraphics/Point.h index 222eddcb46..a0c0e3a4aa 100644 --- a/SharedGraphics/Point.h +++ b/SharedGraphics/Point.h @@ -26,6 +26,13 @@ public: move_by(delta.x(), delta.y()); } + Point translated(int dx, int dy) + { + Point point = *this; + point.move_by(dx, dy); + return point; + } + void constrain(const Rect&); bool operator==(const Point& other) const |