addRects(_:transform:)
Adds a set of rectangular subpaths to the path.
Declaration
func addRects(_ rects: [CGRect], transform: CGAffineTransform = .identity)Parameters
- rects:
An array of rectangles, specified in user space coordinates.
- transform:
An affine transform to apply to the rectangles before adding to the path. Defaults to the identity transform if not specified.
Discussion
Calling this convenience method is equivalent to repeatedly calling the addRect(_:transform:) method for each rectangle in the array.
See Also
Constructing a Graphics Path
move(to:transform:)addLine(to:transform:)addLines(between:transform:)addRect(_:transform:)addEllipse(in:transform:)addRoundedRect(in:cornerWidth:cornerHeight:transform:)addArc(center:radius:startAngle:endAngle:clockwise:transform:)addArc(tangent1End:tangent2End:radius:transform:)addRelativeArc(center:radius:startAngle:delta:transform:)addCurve(to:control1:control2:transform:)addQuadCurve(to:control:transform:)addPath(_:transform:)closeSubpath()