Inheritance diagram for wx.Rect:
A class for manipulating rectangles.
Create a new wx.Rect object.
Parameters:
Returns:
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 wx.VERTICAL or only wx.HORIZONTAL flag, then it is only centered in this direction while the other component of its position remains unchanged.
Parameters:
Returns:
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 wx.VERTICAL or only wx.HORIZONTAL flag, then it is only centered in this direction while the other component of its position remains unchanged.
Parameters:
Returns:
Returns True if the given rectangle is completely inside this rectangle (or touches its boundary) and False otherwise.
Parameters:
Returns:
bool
Returns True if the given rectangle is completely inside this rectangle or touches its boundary.
Parameters:
Returns:
bool
Return True if the point is inside the rect.
Parameters:
Returns:
bool
Decrease the rectangle size.
This method is the opposite from Inflate: Deflate(a, b) is equivalent to Inflate(-a, -b). Please refer to Inflate for full description.
Parameters:
See also
Return the rectangle properties as a tuple.
Returns:
(x, y, width, height)
Gets the bottom point of the rectangle.
Returns:
int
Gets the height member.
Returns:
int
Gets the right point of the rectangle.
Returns:
int
See also
Gets the position of the top left corner of the rectangle, same as GetPosition.
Returns:
Gets the width member.
Returns:
int
Gets the x member.
Returns:
int
Gets the y member.
Returns:
int
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.
The change is made to the rectangle inplace, if instead you need a copy that is inflated, preserving the original then make the copy first:
copy = wx.Rect(*original)
copy.Inflate(10, 15)
Parameters:
See also
Modifies the rectangle to contain the overlapping box of this rectangle and the one passed in as parameter. The version returns the new rectangle, the other one modifies this rectangle in place.
Parameters:
Returns:
Returns True if this rectangle has a non-empty intersection with the rectangle rect and False otherwise.
Parameters:
Returns:
bool
Returns True if this rectangle has a width or height less than or equal to 0 and False otherwise.
Returns:
bool
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.
Parameters:
Set all rectangle properties.
Parameters:
Parameters:
Sets the height.
Parameters:
Parameters:
Parameters:
See also
Parameters:
Sets the width.
Parameters:
Sets the x position.
Parameters:
Sets the y position.
Parameters: