graphinglib.Rectangle.create_difference#

Rectangle.create_difference(other: Self, copy_style: bool = False) Self#

Returns the difference of the polygon with another polygon.

Parameters:
otherPolygon

The other polygon to subtract from the current polygon.

copy_stylebool, optional

If True, the current polygon’s parameters are copied to the new polygon. If False, the new polygon will have default parameters. Default is False.

Returns:
Polygon

The difference of the two polygons.