Contents

enumerateInterpolatedPoints(in:strideByDistance:using:)

Executes a given block using each point in a range with a distance step.

Declaration

func enumerateInterpolatedPoints(in range: __PKFloatRange, strideByDistance distanceStep: CGFloat, using block: @escaping (PKStrokePoint, UnsafeMutablePointer<ObjCBool>) -> Void)

Parameters

  • range:

    The parametric range to enumerate points in.

  • distanceStep:

    The distance to step between points.

  • block:

    The block to execute for each point. This block takes two parameters:

    • point —The interpolated point on the spline.

    • stop —A reference to a Boolean value. Setting the value to YES within the block stops further enumeration, but the that block continues to run until it’s finished.

See Also

Accessing and interpolating points