wx.Rect2D¶
Methods Summary¶__init__ |
|
ConstrainTo |
|
Contains |
|
CreateIntersection |
|
CreateUnion |
|
Get |
Get() . (x, y, width, height) |
GetBottom |
|
GetCentre |
|
GetIM |
Returns an immutable representation of the wx.Rect2D object, based on namedtuple. |
GetLeft |
|
GetLeftBottom |
|
GetLeftTop |
|
GetOutCode |
|
GetOutcode |
|
GetPosition |
|
GetRight |
|
GetRightBottom |
|
GetRightTop |
|
GetSize |
|
GetTop |
|
HaveEqualSize |
|
Inset |
|
Interpolate |
|
Intersect |
|
Intersects |
|
IsEmpty |
|
MoveBottomTo |
|
MoveCentreTo |
|
MoveLeftBottomTo |
|
MoveLeftTo |
|
MoveLeftTopTo |
|
MoveRightBottomTo |
|
MoveRightTo |
|
MoveRightTopTo |
|
MoveTopTo |
|
Offset |
|
Scale |
|
SetBottom |
|
SetCentre |
|
SetLeft |
|
SetLeftBottom |
|
SetLeftTop |
|
SetRight |
|
SetRightBottom |
|
SetRightTop |
|
SetTop |
|
Union |
|
__getitem__ |
|
__len__ |
|
__nonzero__ |
|
__reduce__ |
|
__repr__ |
|
__setitem__ |
|
__str__ |
|
__ne__ |
|
__eq__ |
Properties Summary¶Bottom |
See GetBottom and SetBottom |
Centre |
See GetCentre and SetCentre |
IM |
See GetIM |
Left |
See GetLeft and SetLeft |
LeftBottom |
See GetLeftBottom and SetLeftBottom |
LeftTop |
See GetLeftTop and SetLeftTop |
Position |
See GetPosition |
Right |
See GetRight and SetRight |
RightBottom |
See GetRightBottom and SetRightBottom |
RightTop |
See GetRightTop and SetRightTop |
Size |
See GetSize |
Top |
See GetTop and SetTop |
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 . |
Class API¶wx.Rect2D(object)¶Possible constructors:
Rect2DDouble()
Rect2DDouble(x, y, w, h)
__init__(self, *args, **kw)¶__init__ (self)
__init__ (self, x, y, w, h)
| Parameters: |
|
|---|
ConstrainTo(self, rect)¶| Parameters: | rect (Rect2DDouble) – |
|---|
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: | PyObject |
|---|
GetBottom(self)¶| Return type: | wx.Double |
|---|
GetCentre(self)¶| Return type: | Point2DDouble |
|---|
GetIM(self)¶Returns an immutable representation of the wx.Rect2D object, based on namedtuple.
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: | wx.Double |
|---|
GetLeftBottom(self)¶| Return type: | Point2DDouble |
|---|
GetLeftTop(self)¶| Return type: | Point2DDouble |
|---|
GetOutCode(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|---|
| Return type: | wx.OutCode |
GetOutcode(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|---|
| Return type: | wx.OutCode |
GetPosition(self)¶| Return type: | Point2DDouble |
|---|
GetRight(self)¶| Return type: | wx.Double |
|---|
GetRightBottom(self)¶| Return type: | Point2DDouble |
|---|
GetRightTop(self)¶| Return type: | Point2DDouble |
|---|
GetTop(self)¶| Return type: | wx.Double |
|---|
HaveEqualSize(self, rect)¶| Parameters: | rect (Rect2DDouble) – |
|---|---|
| Return type: | bool |
Inset(self, *args, **kw)¶Inset (self, x, y)
| Parameters: |
|
|---|
Inset (self, left, top, right, bottom)
| Parameters: |
|
|---|
Interpolate(self, widthfactor, heightfactor)¶| Parameters: |
|
|---|---|
| Return type: | Point2DDouble |
Intersect(self, *args, **kw)¶Intersect (self, otherRect)
| Parameters: | otherRect (Rect2DDouble) – |
|---|
Intersect (src1, src2, dest)
| Parameters: |
|
|---|
Intersects(self, rect)¶| Parameters: | rect (Rect2DDouble) – |
|---|---|
| Return type: | bool |
IsEmpty(self)¶| Return type: | bool |
|---|
MoveBottomTo(self, n)¶| Parameters: | n (wx.Double) – |
|---|
MoveCentreTo(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
MoveLeftBottomTo(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
MoveLeftTo(self, n)¶| Parameters: | n (wx.Double) – |
|---|
MoveLeftTopTo(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
MoveRightBottomTo(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
MoveRightTo(self, n)¶| Parameters: | n (wx.Double) – |
|---|
MoveRightTopTo(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
MoveTopTo(self, n)¶| Parameters: | n (wx.Double) – |
|---|
Offset(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
Scale(self, *args, **kw)¶Scale (self, f)
| Parameters: | f (wx.Double) – |
|---|
Scale (self, num, denum)
| Parameters: |
|
|---|
SetBottom(self, n)¶| Parameters: | n (wx.Double) – |
|---|
SetCentre(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
SetLeft(self, n)¶| Parameters: | n (wx.Double) – |
|---|
SetLeftBottom(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
SetLeftTop(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
SetRight(self, n)¶| Parameters: | n (wx.Double) – |
|---|
SetRightBottom(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
SetRightTop(self, pt)¶| Parameters: | pt (Point2DDouble) – |
|---|
SetTop(self, n)¶| Parameters: | n (wx.Double) – |
|---|
Union(self, *args, **kw)¶Union (self, otherRect)
| Parameters: | otherRect (Rect2DDouble) – |
|---|
Union (self, pt)
| Parameters: | pt (Point2DDouble) – |
|---|
Union (src1, src2, dest)
| Parameters: |
|
|---|
__getitem__(self, idx)¶__len__(self)¶__nonzero__(self)¶__reduce__(self)¶__repr__(self)¶__setitem__(self, idx, val)¶__str__(self)¶__ne__(self)¶| Parameters: | rect (Rect2DDouble) – |
|---|
__eq__(self)¶| Parameters: | rect (Rect2DDouble) – |
|---|
LeftBottom¶See GetLeftBottom and SetLeftBottom
LeftTop¶See GetLeftTop and SetLeftTop
Position¶See GetPosition
RightBottom¶See GetRightBottom and SetRightBottom
RightTop¶See GetRightTop and SetRightTop
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 .