#include <wx/gdicmn.h>
Public Member Functions | |
| wxRect () | |
| wxRect (int x, int y, int width, int height) | |
| wxRect (const wxPoint &topLeft, const wxPoint &bottomRight) | |
| wxRect (const wxPoint &pos, const wxSize &size) | |
| wxRect (const wxSize &size) | |
| bool | Contains (int x, int y) const |
| bool | Contains (const wxPoint &pt) const |
| bool | Contains (const wxRect &rect) const |
| int | GetBottom () const |
| wxPoint | GetBottomLeft () const |
| wxPoint | GetBottomRight () const |
| int | GetHeight () const |
| int | GetLeft () const |
| wxPoint | GetPosition () const |
| int | GetRight () const |
| wxSize | GetSize () const |
| int | GetTop () const |
| wxPoint | GetTopLeft () const |
| wxPoint | GetTopRight () const |
| int | GetWidth () const |
| int | GetX () const |
| int | GetY () const |
| wxRect & | Intersect (const wxRect &rect) |
| wxRect | Intersect (const wxRect &rect) const |
| bool | Intersects (const wxRect &rect) const |
| bool | IsEmpty () const |
| void | SetHeight (int height) |
| void | SetSize (const wxSize &s) |
| void | SetWidth (int width) |
| void | SetX (int x) |
| void | SetY (int y) |
| bool | operator!= (const wxRect &r1, const wxRect &r2) |
| wxRect & | operator= (const wxRect &rect) |
| bool | operator== (const wxRect &r1, const wxRect &r2) |
| wxRect | CentreIn (const wxRect &r, int dir=wxBOTH) const |
| wxRect | CenterIn (const wxRect &r, int dir=wxBOTH) const |
| void | Deflate (wxCoord dx, wxCoord dy) |
| void | Deflate (const wxSize &diff) |
| void | Deflate (wxCoord diff) |
| wxRect | Deflate (wxCoord dx, wxCoord dy) const |
| void | Inflate (wxCoord dx, wxCoord dy) |
| void | Inflate (const wxSize &diff) |
| void | Inflate (wxCoord diff) |
| wxRect | Inflate (wxCoord dx, wxCoord dy) const |
| void | Offset (wxCoord dx, wxCoord dy) |
| void | Offset (const wxPoint &pt) |
| wxRect | Union (const wxRect &rect) const |
| wxRect & | Union (const wxRect &rect) |
| wxRect | operator+ (const wxRect &r1, const wxRect &r2) |
| wxRect & | operator+= (const wxRect &r) |
| wxRect | operator* (const wxRect &r1, const wxRect &r2) |
| wxRect & | operator*= (const wxRect &r) |
Public Attributes | |
| int | height |
| int | width |
| int | x |
| int | y |
| wxRect::wxRect | ( | ) |
Default constructor.
| wxRect::wxRect | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) |
Creates a wxRect object from x, y, width and height values.
Creates a wxRect object from top-left and bottom-right points.
Creates a wxRect object from position and size values.
Returns the rectangle having the same size as this one but centered relatively to the given rectangle r. By default, rectangle is centred in both directions but if dir includes only wxVERTICAL or only wxHORIZONTAL, then it is only centered in this direction while the other component of its position remains unchanged.
Returns the rectangle having the same size as this one but centered relatively to the given rectangle r. By default, rectangle is centred in both directions but if dir includes only wxVERTICAL or only wxHORIZONTAL, then it is only centered in this direction while the other component of its position remains unchanged.
| bool wxRect::Contains | ( | int | x, | |
| int | y | |||
| ) | const |
Returns true if the given point is inside the rectangle (or on its boundary) and false otherwise.
| bool wxRect::Contains | ( | const wxPoint & | pt | ) | const |
Returns true if the given point is inside the rectangle (or on its boundary) and false otherwise.
| bool wxRect::Contains | ( | const wxRect & | rect | ) | const |
Returns true if the given rectangle is completely inside this rectangle (or touches its boundary) and false otherwise.
| void wxRect::Deflate | ( | wxCoord | dx, | |
| wxCoord | dy | |||
| ) |
| void wxRect::Deflate | ( | const wxSize & | diff | ) |
| void wxRect::Deflate | ( | wxCoord | diff | ) |
| wxRect wxRect::Deflate | ( | wxCoord | dx, | |
| wxCoord | dy | |||
| ) | const |
| int wxRect::GetBottom | ( | ) | const |
Gets the bottom point of the rectangle.
| wxPoint wxRect::GetBottomLeft | ( | ) | const |
Gets the position of the bottom left corner.
| wxPoint wxRect::GetBottomRight | ( | ) | const |
Gets the position of the bottom right corner.
| int wxRect::GetHeight | ( | ) | const |
Gets the height member.
| int wxRect::GetLeft | ( | ) | const |
Gets the left point of the rectangle (the same as GetX()).
| wxPoint wxRect::GetPosition | ( | ) | const |
Gets the position.
| int wxRect::GetRight | ( | ) | const |
Gets the right point of the rectangle.
| int wxRect::GetTop | ( | ) | const |
Gets the top point of the rectangle (the same as GetY()).
| wxPoint wxRect::GetTopLeft | ( | ) | const |
Gets the position of the top left corner of the rectangle, same as GetPosition().
| wxPoint wxRect::GetTopRight | ( | ) | const |
Gets the position of the top right corner.
| int wxRect::GetWidth | ( | ) | const |
Gets the width member.
| int wxRect::GetX | ( | ) | const |
Gets the x member.
| int wxRect::GetY | ( | ) | const |
Gets the y member.
| void wxRect::Inflate | ( | wxCoord | dx, | |
| wxCoord | dy | |||
| ) |
Increases the size of the rectangle.
The left border is moved farther left and the right border is moved farther right by dx. The upper border is moved farther up and the bottom border is moved farther down by dy. (Note the the width and height of the rectangle thus change by 2*dx and 2*dy, respectively.) If one or both of dx and dy are negative, the opposite happens: the rectangle size decreases in the respective direction.
Inflating and deflating behaves "naturally". Defined more precisely, that means:
| void wxRect::Inflate | ( | const wxSize & | diff | ) |
Increases the size of the rectangle.
The left border is moved farther left and the right border is moved farther right by dx. The upper border is moved farther up and the bottom border is moved farther down by dy. (Note the the width and height of the rectangle thus change by 2*dx and 2*dy, respectively.) If one or both of dx and dy are negative, the opposite happens: the rectangle size decreases in the respective direction.
Inflating and deflating behaves "naturally". Defined more precisely, that means:
| void wxRect::Inflate | ( | wxCoord | diff | ) |
Increases the size of the rectangle.
The left border is moved farther left and the right border is moved farther right by dx. The upper border is moved farther up and the bottom border is moved farther down by dy. (Note the the width and height of the rectangle thus change by 2*dx and 2*dy, respectively.) If one or both of dx and dy are negative, the opposite happens: the rectangle size decreases in the respective direction.
Inflating and deflating behaves "naturally". Defined more precisely, that means:
| wxRect wxRect::Inflate | ( | wxCoord | dx, | |
| wxCoord | dy | |||
| ) | const |
Increases the size of the rectangle.
The left border is moved farther left and the right border is moved farther right by dx. The upper border is moved farther up and the bottom border is moved farther down by dy. (Note the the width and height of the rectangle thus change by 2*dx and 2*dy, respectively.) If one or both of dx and dy are negative, the opposite happens: the rectangle size decreases in the respective direction.
Inflating and deflating behaves "naturally". Defined more precisely, that means:
Modifies this rectangle to contain the overlapping portion of this rectangle and the one passed in as parameter.
Returns the overlapping portion of this rectangle and the one passed in as parameter.
| bool wxRect::Intersects | ( | const wxRect & | rect | ) | const |
Returns true if this rectangle has a non-empty intersection with the rectangle rect and false otherwise.
| bool wxRect::IsEmpty | ( | ) | const |
Returns true if this rectangle has a width or height less than or equal to 0 and false otherwise.
| void wxRect::Offset | ( | wxCoord | dx, | |
| wxCoord | dy | |||
| ) |
Moves the rectangle by the specified offset. If dx is positive, the rectangle is moved to the right, if dy is positive, it is moved to the bottom, otherwise it is moved to the left or top respectively.
| void wxRect::Offset | ( | const wxPoint & | pt | ) |
Moves the rectangle by the specified offset. If dx is positive, the rectangle is moved to the right, if dy is positive, it is moved to the bottom, otherwise it is moved to the left or top respectively.
| void wxRect::SetHeight | ( | int | height | ) |
Sets the height.
| void wxRect::SetWidth | ( | int | width | ) |
Sets the width.
| void wxRect::SetX | ( | int | x | ) |
Sets the x position.
| void wxRect::SetY | ( | int | y | ) |
Sets the y position.
Modifies the rectangle to contain the bounding box of this rectangle and the one passed in as parameter.
Modifies the rectangle to contain the bounding box of this rectangle and the one passed in as parameter.
Like Union(), but doesn't treat empty rectangles specially.
Like Union(), but doesn't treat empty rectangles specially.
Returns the intersection of two rectangles (which may be empty).
Returns the intersection of two rectangles (which may be empty).
| int wxRect::height |
Height member.
| int wxRect::width |
Width member.
| int wxRect::x |
x coordinate of the top-level corner of the rectangle.
| int wxRect::y |
y coordinate of the top-level corner of the rectangle.
|
[ top ] |