- disabled gui for a moment
[enigma2.git] / lib / gdi / erect.h
index c41d83142ae3146fd0a06fbd2ad38e879e8448e2..9eaa7906786b87d2372e03e50db6290a5ec1a369 100644 (file)
@@ -9,6 +9,7 @@
 
 class eRect // rectangle class
 {
+       friend class gRegion;
 public:
        eRect() { x1 = y1 = x2 = y2 = 0; }
        eRect( const ePoint &topleft, const ePoint &bottomright );
@@ -70,6 +71,14 @@ public:
                y2 += dy;
        }
 
+       void moveBy(ePoint r)
+       {
+               x1 += r.x();
+               y1 += r.y();
+               x2 += r.x();
+               y2 += r.y();
+       }
+
        void setRect( int x, int y, int w, int h );
        void setCoords( int x1, int y1, int x2, int y2 );
 
@@ -223,7 +232,7 @@ inline eSize eRect::size() const
 
 inline bool eRect::contains( int x, int y) const
 {
-       return x >= x1 && x < x2 && y >= y1 && y < y2;
+       return (x >= x1) && (x < x2) && (y >= y1) && (y < y2);
 }
 
 #endif // eRect_H