From d533f4848830d2c85b2e81e5a66d83db1f9f32f0 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 6 Apr 2003 00:00:52 +0000 Subject: Move method for Rectangle class. Ensure windows that are moved are not moved off screen to the top or left. --- include/Platform.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/Platform.h b/include/Platform.h index 5ad782c03..db3cd6c7d 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -104,6 +104,12 @@ public: return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } int Width() { return right - left; } int Height() { return bottom - top; } }; -- cgit v1.2.3