Instance Method

setLineDash:count:phase:

Sets the line-stroking pattern for the path.

Declaration

- (void)setLineDash:(const CGFloat *)pattern count:(NSInteger)count phase:(CGFloat)phase;

Parameters

pattern

A C-style array of floating point values that contains the lengths (measured in points) of the line segments and gaps in the pattern. The values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on.

count

The number of values in pattern.

phase

The offset at which to start drawing the pattern, measured in points along the dashed-line pattern. For example, a phase value of 6 for the pattern 5-2-3-2 would cause drawing to begin in the middle of the first gap.

See Also

Accessing Drawing Properties

lineWidth

The line width of the path.

lineCapStyle

The shape of the paths end points when stroked.

lineJoinStyle

The shape of the joints between connected segments of a stroked path.

miterLimit

The limiting value that helps avoid spikes at junctions between connected line segments.

flatness

The factor that determines the rendering accuracy for curved path segments.

usesEvenOddFillRule

A Boolean indicating whether the even-odd winding rule is in use for drawing paths.

- getLineDash:count:phase:

Retrieves the line-stroking pattern for the path.