graphinglib.Polygon.rotate#

Polygon.rotate(angle: float, center: tuple[float, float] | None = None, use_rad: bool = False) Self[source]#

Rotates the polygon by the specified angle.

Parameters:
anglefloat

The angle by which to rotate the polygon (in degrees by default).

centertuple[float, float], optional

The center of rotation. If not specified, the centroid of the polygon is used.

use_radbool, optional

Set to True if the angle is in radians instead of degrees. Default is False.