Contents

addRects(_:transform:)

Adds a set of rectangular subpaths to the path.

Declaration

mutating func addRects(_ rects: [CGRect], transform: CGAffineTransform = .identity)

Discussion

Calling this convenience method is equivalent to repeatedly calling the addRect(_:transform:) method for each rectangle in the array.

  • Parameter:

    • rects: An array of rectangles, specified in user space coordinates.

    • transform: An affine transform to apply to the ellipse before adding to the path. Defaults to the identity transform if not specified.

See Also

Drawing a path