Contents

strokeLineSegments(between:)

Strokes a sequence of line segments.

Declaration

func strokeLineSegments(between points: [CGPoint])

Parameters

  • points:

    An array of points, organized as pairs—the starting point of a line segment followed by the ending point of a line segment. For example, the first point in the array specifies the starting position of the first line, the second point specifies the ending position of the first line, the third point specifies the starting position of the second line, and so forth.

Discussion

This function creates a new path, adds the individual line segments to the path, and then strokes the path. The current path is cleared as a side effect of calling this function.

See Also

Drawing Shapes