---
title: "init(ink:path:transform:mask:)"
framework: pencilkit
role: symbol
role_heading: Initializer
path: "pencilkit/pkstroke-swift.struct/init(ink:path:transform:mask:)-1imp6"
---

# init(ink:path:transform:mask:)

Creates a stroke with the line properties, path, transform, and mask that you specify.

## Declaration

```swift
init(ink: PKInk, path: PKStrokePath, transform: CGAffineTransform = .identity, mask: UIBezierPath? = nil)
```

## Parameters

- `ink`: The doc://com.apple.pencilkit/documentation/PencilKit/PKInk-swift.struct the framework uses to render this stroke.
- `path`: The B-spline path that describes this stroke.
- `transform`: The doc://com.apple.documentation/documentation/CoreFoundation/CGAffineTransform to apply to this stroke.
- `mask`: The pretransform mask the framework uses to clip the rendering of the stroke.

## See Also

### Creating a stroke object

- [init(ink:path:transform:mask:)](pencilkit/pkstroke-swift.struct/init(ink:path:transform:mask:)-w7ti.md)
- [init(ink:path:transform:mask:randomSeed:)](pencilkit/pkstroke-swift.struct/init(ink:path:transform:mask:randomseed:)-10m5j.md)
- [init(ink:path:transform:mask:randomSeed:)](pencilkit/pkstroke-swift.struct/init(ink:path:transform:mask:randomseed:)-epus.md)
