back to ext
wxRect
generated from ../src/mod_ext/rect.cpp
A class for manipulating rectangles
Constants
Constructor
wxRect
wxRect(X,
Y,
Width,
Height)
| Name |
Type |
Default |
Description |
| X |
Integer |
|
X-coordinate of the top level corner
|
| Y |
Integer |
|
Y-coordinate of the top level corner
|
| Width |
Integer |
|
The width of the rectangle
|
| Height |
Integer |
|
The height of the rectangle
|
wxRect(TopLeft,
BottomRight)
| Name |
Type |
Default |
Description |
| TopLeft |
wxPoint |
|
The top-left corner
|
| BottomRight |
wxPoint |
|
The bottom-right corner
|
wxRect(Position,
Size)
Constructs a new wxRect object.
Properties
| Name |
Type |
Description |
| bottom |
Integer |
The bottom
|
| height |
Integer |
The height of the rectangle
|
| left |
Integer |
|
position  |
wxPoint |
|
| right |
Integer |
|
size  |
wxSize |
|
| top |
Integer |
|
| width |
Integer |
The width of the rectangle
|
| x |
Integer |
|
| y |
Integer |
|
Methods
deflate
deflate(X,
Y = X)
| Name |
Type |
Default |
Description |
| X |
Integer |
|
|
| Y |
Integer |
X |
|
Decreases the rectangle size by X in x direction and by Y in y direction.
When Y is not specified then the value of X is used. You can use negative
values to decrease the size.
inflate
inflate(X,
Y)
| Name |
Type |
Default |
Description |
| X |
Integer |
|
|
| Y |
Integer |
|
|
Increases the rectangle size by X in x direction and by Y in y direction.
When Y is not specified then the value of X is used. You can use negative
values to decrease the size.
intersect
intersect(Rect) : wxRect
| Name |
Type |
Default |
Description |
| Rect |
wxRect |
|
|
intersects
intersects(Rect) : Boolean
| Name |
Type |
Default |
Description |
| Rect |
wxRect |
|
|
Returns true when the rectangles have a non empty intersection
offset
offset(X,
Y)
| Name |
Type |
Default |
Description |
| X |
Integer |
|
|
| Y |
Integer |
|
|
offset(Pt)
| Name |
Type |
Default |
Description |
| Pt |
wxPoint |
|
|
Moves the rectangle.