graphinglib.Rectangle.skew#

Rectangle.skew(x_skew: float, y_skew: float, center: tuple[float, float] | None = None, use_rad: bool = False) Self#

Skews the polygon by the specified factors.

Parameters:
x_skewfloat

The factor by which to skew the polygon in the x direction.

y_skewfloat

The factor by which to skew the polygon in the y direction.

centertuple[float, float], optional

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

use_radbool, optional

Set to True if the skewing factors are in radians instead of degrees. Default is False.