diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-04-18 18:11:33 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-04-18 18:11:33 +0000 |
| commit | 83b39a9a3e366d9bc4baadb7c988b874cfe25a08 (patch) | |
| tree | c86f315400e59ef18c01d9d206adf6d37d7c74a8 /src/Geometry.h | |
| parent | 13ac6f2abd09ea0f8bbdd8f3131115200cadc225 (diff) | |
added Inflate, Deflate, and Translate to the Rect geometry class
Diffstat (limited to 'src/Geometry.h')
| -rw-r--r-- | src/Geometry.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Geometry.h b/src/Geometry.h index cbdf0fd1..0ca914b5 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -99,6 +99,18 @@ public: } bool Intersect(const Rect &r) const; + // returns a rect that is this rect increased in size by the passed in amount + Rect Inflate(const unsigned int i) const; + Rect Inflate(const unsigned int iw, const unsigned int ih) const; + Rect Inflate(const Size &i) const; + // returns a rect that is this rect decreased in size by the passed in amount + Rect Deflate(const unsigned int d) const; + Rect Deflate(const unsigned int dw, const unsigned int dh) const; + Rect Deflate(const Size &d) const; + // returns a rect that is moved the amount specified + Rect Translate(const int t) const; + Rect Translate(const int tx, const int ty) const; + Rect Translate(const Point &t) const; }; #endif // __geometry_h |
