Contents

substroke(range:)

Returns a copy of this stroke containing the control points in the given range.

Declaration

func substroke(range: ClosedRange<CGFloat>) -> PKStroke

Parameters

  • range:

    The range of control points in the receiver to copy to the returned stroke.

Mentioned in

Return Value

A new stroke containing only the control points within the specified range.

Discussion

Maintains information for PencilKit rendering to make the copied part of the stroke render the same as the receiver. The returned stroke may have a renderState set to maintain this information.