]> Dogcows Code - chaz/openbox/blobdiff - src/Geometry.h
new bsetbg version with manpage
[chaz/openbox] / src / Geometry.h
index db9a411f80f650e8584e07ac1c041ca034f6b99c..0ca914b5dae19a2b5056d09ce1ea30160c6ab580 100644 (file)
@@ -67,11 +67,13 @@ public:
   Rect(const int x, const int y, const unsigned int w, const unsigned int h);
   
   void setSize(const Size &size);
+  void setSize(const unsigned int w, const unsigned int h);
   inline const Size &size() const {
     return const_cast<const Size &>(m_size);
   }
   
   void setOrigin(const Point &origin);
+  void setOrigin(const int x, const int y);
   inline const Point &origin() const {
     return const_cast<const Point &>(m_origin);
   }
@@ -97,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
This page took 0.021152 seconds and 4 git commands to generate.