Creates a dashed copy of another path.
- iOS 5.0+
- macOS 10.7+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Graphics
The path to copy.
A pointer to an affine transformation matrix, or
NULLif no transformation is needed. If specified, Core Graphics applies the transformation to elements of the converted path before adding them to the new path.
A value that specifies how far into the dash pattern the line starts, in units of the user space. For example, passing a value of
3means the line is drawn with the dash pattern starting at three units from its beginning. Passing a value of
0draws a line starting with the beginning of a dash pattern.
An array of values that specify the lengths of the painted segments and unpainted segments, respectively, of the dash pattern—or
NULLfor no dash pattern.
For example, passing an array with the values
[2,3]sets a dash pattern that alternates between a 2-user-space-unit-long painted segment and a 3-user-space-unit-long unpainted segment. Passing the values
[1,3,4,2]sets the pattern to a 1-unit painted segment, a 3-unit unpainted segment, a 4-unit painted segment, and a 2-unit unpainted segment.
lengthsparameter specifies an array, pass the number of elements in the array. Otherwise, pass
A new, immutable path. You are responsible for releasing this object.
The new path is created so that filling the new path draws the same pixels as stroking the original path with the specified dash parameters.