Contents

addRect(_:)

Adds a rectangular path to the current path.

Declaration

func addRect(_ rect: CGRect)

Parameters

  • rect:

    A rectangle, specified in user space coordinates.

Discussion

This is a convenience function that adds a rectangle to a path, starting by moving to the bottom left corner and then adding lines counter-clockwise to create a rectangle, closing the subpath.

See Also

Constructing a Current Graphics Path