<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKStrokePath-swift.struct/init(bezierPath:creationDate:pointProvider:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "s:9PencilKit12PKStrokePathV06bezierD012creationDate13pointProviderACSo9CGPathRefa_10Foundation0G0VAA0C5PointVAC015ConvertedBezierM0VXEtcfc"
  },
  "title" : "init(bezierPath:creationDate:pointProvider:)"
}
-->

# init(bezierPath:creationDate:pointProvider:)

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

```
init(bezierPath: CGPath, creationDate: Date, pointProvider: (PKStrokePath.ConvertedBezierPoint) -> PKStrokePoint)
```

## Parameters

`bezierPath`

The Bézier path to convert to a cubic uniform B-Spline

`creationDate`

The start time of this path.

`pointProvider`

Closure to initialize the `PKStrokePoint`s of the path with specific values.

## Discussion

The count of control points of the generated spline is not guaranteed to be a specific value
except when the provided path is the output of `bezierRepresentation->CGPath`, where it will match the original curve.

The output B-Spline will have continuous curvature and 0 curvature at the endpoints. In cases where the B-Spline
cannot fully recreate the Bézier path, it will be an approximation. For example, if the given Bézier path includes
`line to` elements, these will produce straight line segments in the resulting B-Spline, but if a `line to` element
is adjacent to a `curve to` element, the resulting curve may not match the original.

> Warning: For a Bézier path with multiple subpaths, only the first will be converted.

---

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)