intersect method

intersect

Replaces this Rectangle with the intersection of itself and the specified Rectangle.

def intersect(self, rect):
    ...
ParameterTypeDescription
rectRectangleThe Rectangle with which to intersect.

intersect

Returns a third Rectangle structure that represents the intersection of two other Rectangle structures. If there is no intersection, an empty Rectangle is returned.

Returns

A Rectangle that represents the intersection of a and b.

def intersect(self, a, b):
    ...
ParameterTypeDescription
aRectangleA first rectangle to intersect.
bRectangleA second rectangle to intersect.

See Also