X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmath%2Frectf.hpp;h=cdff094b49681ac381f5677918b5c30b04ce0af7;hb=59efbd735953fa9bcbe9aac55cb4f027e06436b2;hp=80bc47829bdd3ee84823345115fb1eb19f3483fd;hpb=1c73821c7db099f998afdf98c9f4927ceb5ac398;p=supertux.git diff --git a/src/math/rectf.hpp b/src/math/rectf.hpp index 80bc47829..cdff094b4 100644 --- a/src/math/rectf.hpp +++ b/src/math/rectf.hpp @@ -129,6 +129,12 @@ public: return ((v1 - v2).norm ()); } + Rectf grown(float border) const + { + return Rectf(p1.x - border, p1.y - border, + p2.x + border, p2.y + border); + } + // leave these two public to save the headaches of set/get functions for such // simple things :)