---
title: "init(controlPoints:creationDate:id:)"
framework: pencilkit
role: symbol
role_heading: Initializer
path: "pencilkit/pkstrokepath-swift.struct/init(controlpoints:creationdate:id:)"
---

# init(controlPoints:creationDate:id:)

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

## Declaration

```swift
init<T>(controlPoints: T, creationDate: Date, id: UUID) where T : Sequence, T.Element == PKStrokePoint
```

## Parameters

- `controlPoints`: An array of control points for a cubic B-spline.
- `creationDate`: The start time of this path.
- `id`: The unique identity of the path.

## Discussion

Discussion warning: Using multiple stroke paths with identical IDs but different control points will result in undefined rendering behavior. Ensure each stroke path has a unique identifier.

## See Also

### Creating a new stroke path

- [init()](pencilkit/pkstrokepath-swift.struct/init().md)
- [init(controlPoints:creationDate:)](pencilkit/pkstrokepath-swift.struct/init(controlpoints:creationdate:).md)
- [init(bezierPath:creationDate:pointProvider:)](pencilkit/pkstrokepath-swift.struct/init(bezierpath:creationdate:pointprovider:).md)
- [PKStrokePath.ConvertedBezierPoint](pencilkit/pkstrokepath-swift.struct/convertedbezierpoint.md)
