Table Of Contents

Previous topic

Rect

Next topic

RefCounter

This Page

phoenix_title Rect2DDouble


class_hierarchy Inheritance Diagram

Inheritance diagram for class Rect2DDouble

Inheritance diagram of Rect2DDouble


api Class API



class Rect2DDouble(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 (float) –
  • y (float) –
  • w (float) –
  • h (float) –





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:float


GetCentre(self)
Return type: Point2DDouble


GetLeft(self)
Return type:float


GetLeftBottom(self)
Return type: Point2DDouble


GetLeftTop(self)
Return type: Point2DDouble


GetOutCode(self, pt)
Parameters:pt (Point2DDouble) –
Return type: OutCode


GetOutcode(self, pt)
Parameters:pt (Point2DDouble) –
Return type: 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: Size


GetTop(self)
Return type:float


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


Inset(self, *args, **kw)

overload Overloaded Implementations:



Inset (self, x, y)

Parameters:
  • x (float) –
  • y (float) –



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

Parameters:
  • left (float) –
  • top (float) –
  • right (float) –
  • bottom (float) –





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

Point2DDouble



Intersect(self, *args, **kw)

overload Overloaded Implementations:



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 (float) –


MoveCentreTo(self, pt)
Parameters:pt (Point2DDouble) –


MoveLeftBottomTo(self, pt)
Parameters:pt (Point2DDouble) –


MoveLeftTo(self, n)
Parameters:n (float) –


MoveLeftTopTo(self, pt)
Parameters:pt (Point2DDouble) –


MoveRightBottomTo(self, pt)
Parameters:pt (Point2DDouble) –


MoveRightTo(self, n)
Parameters:n (float) –


MoveRightTopTo(self, pt)
Parameters:pt (Point2DDouble) –


MoveTopTo(self, n)
Parameters:n (float) –


Offset(self, pt)
Parameters:pt (Point2DDouble) –


Scale(self, *args, **kw)

overload Overloaded Implementations:



Scale (self, f)

Parameters:f (float) –



Scale (self, num, denum)

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





SetBottom(self, n)
Parameters:n (float) –


SetCentre(self, pt)
Parameters:pt (Point2DDouble) –


SetLeft(self, n)
Parameters:n (float) –


SetLeftBottom(self, pt)
Parameters:pt (Point2DDouble) –


SetLeftTop(self, pt)
Parameters:pt (Point2DDouble) –


SetRight(self, n)
Parameters:n (float) –


SetRightBottom(self, pt)
Parameters:pt (Point2DDouble) –


SetRightTop(self, pt)
Parameters:pt (Point2DDouble) –


SetTop(self, n)
Parameters:n (float) –


Union(self, *args, **kw)

overload Overloaded Implementations:



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

Properties



Bottom

See GetBottom and SetBottom



Centre

See GetCentre and SetCentre



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