<!--
{
  "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/PKStrokeReference/init(ink:strokePath:transform:mask:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PKStroke(im)initWithInk:strokePath:transform:mask:"
  },
  "title" : "init(ink:strokePath:transform:mask:)"
}
-->

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

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

```
init(ink: PKInk, strokePath: PKStrokePath, transform: CGAffineTransform, mask: UIBezierPath?)
```

## Parameters

`ink`

The [`PKInkReference`](/documentation/PencilKit/PKInkReference) the class uses to render this stroke.

`strokePath`

The B-spline path that describes this stroke.

`transform`

The <doc://com.apple.documentation/documentation/CoreFoundation/CGAffineTransform> to apply to this stroke. Defaults to <doc://com.apple.documentation/documentation/CoreGraphics/CGAffineTransformIdentity>.

`mask`

The pretransform mask the class uses to clip the rendering of the stroke.

## Discussion

---

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)