---
title: "path(in:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/shape/path(in:)"
---

# path(in:)

Describes this shape as a path within a rectangular frame of reference.

## Declaration

```swift
nonisolated func path(in rect: CGRect) -> Path
```

## Parameters

- `rect`: The frame of reference for describing this shape.

## Return Value

Return Value A path that describes this shape.

## See Also

### Defining a shape’s size and path

- [sizeThatFits(_:)](swiftui/shape/sizethatfits(_:).md)
