contains method

contains

Determines if the specified point is contained within this Rectangle structure.

Returns

This method returns true if the point represented by point is contained within this Rectangle structure; otherwise false.

def contains(self, point):
    ...
ParameterTypeDescription
pointPointThe Point to test.

contains

Determines if the rectangular region represented by rect is entirely contained within this Rectangle structure.

Returns

This method returns true if the rectangular region represented by rect is entirely contained within this Rectangle structure; otherwise false.

def contains(self, rect):
    ...
ParameterTypeDescription
rectRectangleThe Rectangle to test.

contains

Determines if the specified point is contained within this Rectangle structure.

Returns

This method returns true if the point defined by x and y is contained within this Rectangle structure; otherwise false.

def contains(self, x, y):
    ...
ParameterTypeDescription
xintThe x-coordinate of the point to test.
yintThe y-coordinate of the point to test.

See Also