rectangle method

rectangle

Defines a rectangular clip path with optional rounded corners.

Returns

The current instance of ClipPathBuilder for method chaining.

def rectangle(self, x, y, width, height, rx, ry, type):
    ...
ParameterTypeDescription
xfloatX-coordinate of the top-left corner of the rectangle.
yfloatY-coordinate of the top-left corner of the rectangle.
widthfloatWidth of the rectangle.
heightfloatHeight of the rectangle.
rxfloatHorizontal radius of the corners.
ryfloatVertical radius of the corners.
typeLengthTypeThe unit type for the dimensions.

See Also