<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKStroke-swift.struct/init(ink:path:transform:mask:)-w7ti",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "s:9PencilKit8PKStrokeV3ink4path9transform4maskAcA5PKInkV_AA0C4PathVSo17CGAffineTransformVSo08NSBezierI0CSgtcfc"
  },
  "title" : "init(ink:path:transform:mask:)"
}
-->

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

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

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

## Parameters

`ink`

The [`PKInk`](/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.

---

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)