Rect class

Rect class

A class to represent the rectangle

The Rect type exposes the following members:

Constructors

ConstructorDescription
__init__(self, x, y, width, height)Constructor of class Rect
__init__(self)Constructs a new instance of Rect

Properties

PropertyDescription
widthGets or sets the width of the size
heightGets or sets the height of the size
xGets or sets the x of the size
yGets or sets the y of the size
leftGets the left of the rectangle
rightGets the right of the rectangle
topGets the top of the rectangle
bottomGets the bottom of the rectangle

Methods

MethodDescription
contains(self, x, y)Return true if the given point is inside the rectangle.

See Also