Canvasity.rect

Add a closed subpath in the shape of a rectangle.

The rectangle has one corner at the given point and then goes in the direction along the width before going in the direction of the height towards the opposite corner. The current transform at the time that this is called will affect the given point and rectangle. The width and/or the height may be negative or zero, and this can affect the winding direction.

Parameters

x float

Horizontal coordinate of a rectangle corner.

y float

Vertical coordinate of a rectangle corner.

width float

Width of the rectangle.

height float

Height of the rectangle.

Meta