<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKStrokePath-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "s:9PencilKit12PKStrokePathV"
  },
  "title" : "PKStrokePath"
}
-->

# PKStrokePath

A structure that captures the components of a stroke and provides methods to find and interpolate points along the stroke’s path.

```
struct PKStrokePath
```

## Topics

### Creating a new stroke path

[`init()`](/documentation/PencilKit/PKStrokePath-swift.struct/init())

Creates an empty stroke path.

[`init(controlPoints:creationDate:)`](/documentation/PencilKit/PKStrokePath-swift.struct/init(controlPoints:creationDate:))

Creates a stroke path with the cubic B-spline control points and a date that you specify.

[`init(controlPoints:creationDate:id:)`](/documentation/PencilKit/PKStrokePath-swift.struct/init(controlPoints:creationDate:id:))

Creates a stroke path with the specified cubic B-spline control points and a unique identifier.

[`init(bezierPath:creationDate:pointProvider:)`](/documentation/PencilKit/PKStrokePath-swift.struct/init(bezierPath:creationDate:pointProvider:))

Creates a stroke path recreating the specified Bézier path as a cubic uniform B-Spline.

[`PKStrokePath.ConvertedBezierPoint`](/documentation/PencilKit/PKStrokePath-swift.struct/ConvertedBezierPoint)

Information about a B-spline control point converted from a Bézier path.

### Identifying the path

[`id`](/documentation/PencilKit/PKStrokePath-swift.struct/id)

The unique identity of the stroke path.

### Converting to and from Bézier paths

[`bezierRepresentation`](/documentation/PencilKit/PKStrokePath-swift.struct/bezierRepresentation)

A Bézier path representation of the path’s curve, computed in linear time.

### Getting the stroke path properties

[`creationDate`](/documentation/PencilKit/PKStrokePath-swift.struct/creationDate)

The creation date and time of this stroke path.

### Getting the stroke path data

### Accessing and interpolating points

[`interpolatedPoints(in:by:)`](/documentation/PencilKit/PKStrokePath-swift.struct/interpolatedPoints(in:by:))

Returns the slice on-curve points using the floating point range and stride that you specify.

[`interpolatedLocation(at:)`](/documentation/PencilKit/PKStrokePath-swift.struct/interpolatedLocation(at:))

Returns the on-curve point for the floating point parametric value.

[`interpolatedPoint(at:)`](/documentation/PencilKit/PKStrokePath-swift.struct/interpolatedPoint(at:))

Returns the on-curve point for the provided floating point parameter.

[`parametricValue(_:offsetBy:)`](/documentation/PencilKit/PKStrokePath-swift.struct/parametricValue(_:offsetBy:))

### Supporting types

[`PKStrokePath.InterpolatedSlice`](/documentation/PencilKit/PKStrokePath-swift.struct/InterpolatedSlice)

A struct representing an interpolated slice of stroke points with a specific stride across a range of this stroke data.

### Supporting protocol requirements

[Protocol implementations](/documentation/PencilKit/pkstrokepath-protocol-implementations)

Access the stroke path’s implementations of protocol methods.

### Using reference types

[`PKStrokePathReference`](/documentation/PencilKit/PKStrokePathReference)

A class that captures the components of a stroke and provides methods to find and interpolate points along the stroke’s path.

### Instance Methods



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)