wx.Rect2D¶
Class Hierarchy¶
Methods Summary¶
Get() . (x, y, width, height) |
|
Returns an immutable representation of the |
|
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
A public C++ attribute of type Double . |
|
A public C++ attribute of type Double . |
|
A public C++ attribute of type Double . |
|
A public C++ attribute of type Double . |
Class API¶
- class wx.Rect2D(object)¶
Possible constructors:
Rect2DDouble() -> None Rect2DDouble(x, y, w, h) -> None
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
- Return type:
None
__init__ (self, x, y, w, h)
- Parameters:
x (wx.Double)
y (wx.Double)
w (wx.Double)
h (wx.Double)
- Return type:
None
- ConstrainTo(self, rect)¶
- Parameters:
rect (Rect2DDouble)
- Return type:
None
- Contains(self, *args, **kw)¶
-
Contains (self, pt)
- Parameters:
pt (Point2DDouble)
- Return type:
bool
Contains (self, rect)
- Parameters:
rect (Rect2DDouble)
- Return type:
bool
- CreateIntersection(self, otherRect)¶
- Parameters:
otherRect (Rect2DDouble)
- Return type:
Rect2DDouble
- CreateUnion(self, otherRect)¶
- Parameters:
otherRect (Rect2DDouble)
- Return type:
Rect2DDouble
- Get(self)¶
Get() . (x, y, width, height)
Return the rectangle’s properties as a tuple.
- Return type:
Any
- GetBottom(self)¶
- Return type:
float
- GetCentre(self)¶
- Return type:
Point2DDouble
- GetIM(self)¶
Returns an immutable representation of the
wx.Rect2D
object, based onnamedtuple
.This new object is hashable and can be used as a dictionary key, be added to sets, etc. It can be converted back into a real
wx.Rect2D
with a simple statement like this:obj = wx.Rect2D(imObj)
.
- GetLeft(self)¶
- Return type:
float
- GetLeftBottom(self)¶
- Return type:
Point2DDouble
- GetLeftTop(self)¶
- Return type:
Point2DDouble
- GetOutCode(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
- GetOutcode(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
- GetPosition(self)¶
- Return type:
Point2DDouble
- GetRight(self)¶
- Return type:
float
- GetRightBottom(self)¶
- Return type:
Point2DDouble
- GetRightTop(self)¶
- Return type:
Point2DDouble
- GetTop(self)¶
- Return type:
float
- HaveEqualSize(self, rect)¶
- Parameters:
rect (Rect2DDouble)
- Return type:
bool
- Inset(self, *args, **kw)¶
-
Inset (self, x, y)
- Parameters:
x (wx.Double)
y (wx.Double)
- Return type:
None
Inset (self, left, top, right, bottom)
- Parameters:
left (wx.Double)
top (wx.Double)
right (wx.Double)
bottom (wx.Double)
- Return type:
None
- Interpolate(self, widthfactor, heightfactor)¶
- Parameters:
widthfactor (wx.int)
heightfactor (wx.int)
- Return type:
Point2DDouble
- Intersect(self, *args, **kw)¶
-
Intersect (self, otherRect)
- Parameters:
otherRect (Rect2DDouble)
- Return type:
None
Intersect (src1, src2, dest)
- Parameters:
src1 (Rect2DDouble)
src2 (Rect2DDouble)
dest (Rect2DDouble)
- Return type:
None
- Intersects(self, rect)¶
- Parameters:
rect (Rect2DDouble)
- Return type:
bool
- IsEmpty(self)¶
- Return type:
bool
- MoveBottomTo(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- MoveCentreTo(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- MoveLeftBottomTo(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- MoveLeftTo(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- MoveLeftTopTo(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- MoveRightBottomTo(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- MoveRightTo(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- MoveRightTopTo(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- MoveTopTo(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- Offset(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- Scale(self, *args, **kw)¶
-
Scale (self, f)
- Parameters:
f (wx.Double)
- Return type:
None
Scale (self, num, denum)
- Parameters:
num (wx.int)
denum (wx.int)
- Return type:
None
- SetBottom(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- SetCentre(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- SetLeft(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- SetLeftBottom(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- SetLeftTop(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- SetRight(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- SetRightBottom(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- SetRightTop(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
None
- SetTop(self, n)¶
- Parameters:
n (wx.Double)
- Return type:
None
- Union(self, *args, **kw)¶
-
Union (self, otherRect)
- Parameters:
otherRect (Rect2DDouble)
- Return type:
None
Union (self, pt)
- Parameters:
pt (Point2DDouble)
- Return type:
None
Union (src1, src2, dest)
- Parameters:
src1 (Rect2DDouble)
src2 (Rect2DDouble)
dest (Rect2DDouble)
- Return type:
None
- __bool__(self)¶
- __getitem__(self, idx)¶
- __len__(self)¶
- __nonzero__(self)¶
- __reduce__(self)¶
- __repr__(self)¶
- __setitem__(self, idx, val)¶
- __str__(self)¶
- __ne__(self, rect)¶
- Parameters:
rect (Rect2DDouble)
- Return type:
bool
- __eq__(self, rect)¶
- Parameters:
rect (Rect2DDouble)
- Return type:
bool
Properties¶
- LeftBottom¶
See
GetLeftBottom
andSetLeftBottom
- LeftTop¶
See
GetLeftTop
andSetLeftTop
- Position¶
See
GetPosition
- RightBottom¶
See
GetRightBottom
andSetRightBottom
- RightTop¶
See
GetRightTop
andSetRightTop
- m_height¶
A public C++ attribute of type Double .
- m_width¶
A public C++ attribute of type Double .
- m_x¶
A public C++ attribute of type Double .
- m_y¶
A public C++ attribute of type Double .