phoenix_title wx.Rect2D


class_hierarchy Class Hierarchy

Inheritance diagram for class Rect2D:

method_summary 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

__bool__

__getitem__

__len__

__nonzero__

__reduce__

__repr__

__setitem__

__str__

__ne__

__eq__


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() -> None

Rect2DDouble(x : float, y : float, w : float, h : float) -> None

Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Return type:

None



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

Parameters:
  • x (wx.Double) –

  • y (wx.Double) –

  • w (wx.Double) –

  • h (wx.Double) –

Return type:

None





ConstrainTo(self, rect : Rect2DDouble)
Parameters:

rect (Rect2DDouble) –

Return type:

None



Contains(self, *args, **kw)

overload Overloaded Implementations:



Contains (self, pt : Point2DDouble)

Parameters:

pt (Point2DDouble) –

Return type:

bool



Contains (self, rect : Rect2DDouble)

Parameters:

rect (Rect2DDouble) –

Return type:

bool





CreateIntersection(self, otherRect : Rect2DDouble)
Parameters:

otherRect (Rect2DDouble) –

Return type:

Rect2DDouble



CreateUnion(self, otherRect : Rect2DDouble)
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 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:

float



GetLeftBottom(self)
Return type:

Point2DDouble



GetLeftTop(self)
Return type:

Point2DDouble



GetOutCode(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

wx.OutCode



GetOutcode(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

wx.OutCode



GetPosition(self)
Return type:

Point2DDouble



GetRight(self)
Return type:

float



GetRightBottom(self)
Return type:

Point2DDouble



GetRightTop(self)
Return type:

Point2DDouble



GetSize(self)
Return type:

wx.Size



GetTop(self)
Return type:

float



HaveEqualSize(self, rect : Rect2DDouble)
Parameters:

rect (Rect2DDouble) –

Return type:

bool



Inset(self, *args, **kw)

overload Overloaded Implementations:



Inset (self, x : float, y : float)

Parameters:
  • x (wx.Double) –

  • y (wx.Double) –

Return type:

None



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

Parameters:
  • left (wx.Double) –

  • top (wx.Double) –

  • right (wx.Double) –

  • bottom (wx.Double) –

Return type:

None





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

  • heightfactor (wx.int) –

Return type:

Point2DDouble



Intersect(self, *args, **kw)

overload Overloaded Implementations:



Intersect (self, otherRect : Rect2DDouble)

Parameters:

otherRect (Rect2DDouble) –

Return type:

None



Intersect (src1 : Rect2DDouble, src2 : Rect2DDouble, dest : Rect2DDouble)

Parameters:
  • src1 (Rect2DDouble) –

  • src2 (Rect2DDouble) –

  • dest (Rect2DDouble) –

Return type:

None





Intersects(self, rect : Rect2DDouble)
Parameters:

rect (Rect2DDouble) –

Return type:

bool



IsEmpty(self)
Return type:

bool



MoveBottomTo(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



MoveCentreTo(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



MoveLeftBottomTo(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



MoveLeftTo(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



MoveLeftTopTo(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



MoveRightBottomTo(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



MoveRightTo(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



MoveRightTopTo(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



MoveTopTo(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



Offset(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



Scale(self, *args, **kw)

overload Overloaded Implementations:



Scale (self, f : float)

Parameters:

f (wx.Double) –

Return type:

None



Scale (self, num : int, denum : int)

Parameters:
  • num (wx.int) –

  • denum (wx.int) –

Return type:

None





SetBottom(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



SetCentre(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



SetLeft(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



SetLeftBottom(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



SetLeftTop(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



SetRight(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



SetRightBottom(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



SetRightTop(self, pt : Point2DDouble)
Parameters:

pt (Point2DDouble) –

Return type:

None



SetTop(self, n : float)
Parameters:

n (wx.Double) –

Return type:

None



Union(self, *args, **kw)

overload Overloaded Implementations:



Union (self, otherRect : Rect2DDouble)

Parameters:

otherRect (Rect2DDouble) –

Return type:

None



Union (self, pt : Point2DDouble)

Parameters:

pt (Point2DDouble) –

Return type:

None



Union (src1 : Rect2DDouble, src2 : Rect2DDouble, dest : Rect2DDouble)

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