- void setX(int __x);
- void setY(int __y);
- void setPos(int __x, int __y);
-
- inline unsigned int width(void) const { return _x2 - _x1 + 1; }
- inline unsigned int height(void) const { return _y2 - _y1 + 1; }
- void setWidth(unsigned int __w);
- void setHeight(unsigned int __h);
- void setSize(unsigned int __w, unsigned int __h);
-
- void setRect(int __x, int __y, unsigned int __w, unsigned int __h);
-
- void setCoords(int __l, int __t, int __r, int __b);
-
+ //! Returns the Point that defines the top left corner of the rectangle
+ inline Point location() const { return Point(_x1, _y1); }
+
+ //! Sets the x coordinate of the Rect.
+ /*!
+ @param x The new x component of the point defining the top left corner of
+ the rectangle
+ */
+ void setX(int x);
+ //! Sets the y coordinate of the Rect.
+ /*!
+ @param y The new y component of the point defining the top left corner of
+ the rectangle
+ */
+ void setY(int y);
+ //! Sets the x and y coordinates of the Rect.
+ /*!
+ @param x The new x component of the point defining the top left corner of
+ the rectangle
+ @param y The new y component of the point defining the top left corner of
+ the rectangle
+ */
+ void setPos(int x, int y);
+ //! Sets the x and y coordinates of the Rect.
+ /*!
+ @param location The point defining the top left corner of the rectangle.
+ */
+ void setPos(const Point &location);
+
+ //! The width of the Rect
+ inline int width(void) const { return _x2 - _x1 + 1; }
+ //! The height of the Rect
+ inline int height(void) const { return _y2 - _y1 + 1; }
+ //! Returns the size of the Rect
+ inline Point size() const { return Point(_x2 - _x1 + 1, _y2 - _y1 + 1); }
+
+ //! Sets the width of the Rect
+ /*!
+ @param w The new width of the rectangle
+ */
+ void setWidth(int w);
+ //! Sets the height of the Rect
+ /*!
+ @param h The new height of the rectangle
+ */
+ void setHeight(int h);
+ //! Sets the size of the Rect.
+ /*!
+ @param w The new width of the rectangle
+ @param h The new height of the rectangle
+ */
+ void setSize(int w, int h);
+ //! Sets the size of the Rect.
+ /*!
+ @param size The new size of the rectangle
+ */
+ void setSize(const Point &size);
+
+ //! Sets the position and size of the Rect
+ /*!
+ @param x The new x component of the point defining the top left corner of
+ the rectangle
+ @param y The new y component of the point defining the top left corner of
+ the rectangle
+ @param w The new width of the rectangle
+ @param h The new height of the rectangle
+ */
+ void setRect(int x, int y, int w, int h);
+ //! Sets the position and size of the Rect
+ /*!
+ @param location The new point defining the top left corner of the rectangle
+ @param size The new size of the rectangle
+ */
+ void setRect(const Point &location, const Point &size);
+
+ //! Sets the position of all 4 sides of the Rect
+ /*!
+ @param l The new left coordinate of the rectangle
+ @param t The new top coordinate of the rectangle
+ @param r The new right coordinate of the rectangle
+ @param b The new bottom coordinate of the rectangle
+ */
+ void setCoords(int l, int t, int r, int b);
+ //! Sets the position of all 4 sides of the Rect
+ /*!
+ @param tl The new point at the top left of the rectangle
+ @param br The new point at the bottom right of the rectangle
+ */
+ void setCoords(const Point &tl, const Point &br);
+
+ //! Determines if two Rect objects are equal
+ /*!
+ The rectangles are considered equal if they are in the same position and
+ are the same size.
+ */