copy(strokingWithWidth:lineCap:lineJoin:miterLimit:transform:)
Returns a new path equivalent to the results of drawing the path with a solid stroke.
Declaration
func copy(strokingWithWidth lineWidth: CGFloat, lineCap: CGLineCap, lineJoin: CGLineJoin, miterLimit: CGFloat, transform: CGAffineTransform = .identity) -> CGPathParameters
- lineWidth:
The line width to use, in user space units. The value must be greater than
0. - lineCap:
The line cap style to render. (For equivalent Cgcontext drawing methods, the default style is Butt.)
- lineJoin:
The line join style to render. (For equivalent Cgcontext drawing methods, the default style is Miter.)
- miterLimit:
A value that limits how sharp individual corners in the path can be when using the Miter line join style. When the ratio of a the length required for a mitered corner to the line width exceeds this value, that corner uses the Bevel style instead.
- transform:
An affine transform to apply to the path before dashing. Defaults to the Cgaffinetransformidentity transform if not specified.
Return Value
A new path.
Discussion
The new path is created so that filling the new path draws the same pixels as stroking the original path with the specified line style.