Phoenix Logo

phoenix_title wx.Rect2D


class_hierarchy Class Hierarchy

Inheritance diagram for class Rect2D:


property_summary 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 .

api Class API



class wx.Rect2D(object)

Possible constructors:

Rect2DDouble()

Rect2DDouble(x, y, w, h)

Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)



__init__ (self, x, y, w, h)

Parameters:
  • x (wx.Double) –
  • y (wx.Double) –
  • w (wx.Double) –
  • h (wx.Double) –





ConstrainTo(self, rect)
Parameters:rect (Rect2DDouble) –


Contains(self, *args, **kw)

overload Overloaded Implementations:



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


GetSize(self)
Return type: wx.Size


GetTop(self)
Return type:wx.Double


HaveEqualSize(self, rect)
Parameters:rect (Rect2DDouble) –
Return type:bool


Inset(self, *args, **kw)

overload Overloaded Implementations:



Inset (self, x, y)

Parameters:
  • x (wx.Double) –
  • y (wx.Double) –



Inset (self, left, top, right, bottom)

Parameters:
  • left (wx.Double) –
  • top (wx.Double) –
  • right (wx.Double) –
  • bottom (wx.Double) –





Interpolate(self, widthfactor, heightfactor)
Parameters:
  • widthfactor (wx.int) –
  • heightfactor (wx.int) –
Return type:

Point2DDouble



Intersect(self, *args, **kw)

overload Overloaded Implementations:



Intersect (self, otherRect)

Parameters:otherRect (Rect2DDouble) –



Intersect (src1, src2, dest)

Parameters:
  • src1 (Rect2DDouble) –
  • src2 (Rect2DDouble) –
  • dest (Rect2DDouble) –





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)

overload Overloaded Implementations:



Scale (self, f)

Parameters:f (wx.Double) –



Scale (self, num, denum)

Parameters:
  • num (wx.int) –
  • denum (wx.int) –





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)

overload Overloaded Implementations:



Union (self, otherRect)

Parameters:otherRect (Rect2DDouble) –



Union (self, pt)

Parameters:pt (Point2DDouble) –



Union (src1, src2, dest)

Parameters:
  • src1 (Rect2DDouble) –
  • src2 (Rect2DDouble) –
  • dest (Rect2DDouble) –





__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) –

Properties



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 .