---
title: "subpath(with:)"
framework: pencilkit
role: symbol
role_heading: Instance Method
path: "pencilkit/pkstrokepathreference/subpath(with:)"
---

# subpath(with:)

Returns a copy of the path containing the control points in the specified parametric range.

## Declaration

```swift
func subpath(with range: __PKFloatRange) -> PKStrokePath
```

## Parameters

- `range`: The parametric range to copy. Values must be within [0, count-1].

## Return Value

Return Value A new stroke path containing the portion within the specified parametric range.
