---
title: "offsetBy(dx:dy:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/path/offsetby(dx:dy:)"
---

# offsetBy(dx:dy:)

Returns a path constructed by translating all its points.

## Declaration

```swift
func offsetBy(dx: CGFloat, dy: CGFloat) -> Path
```

## Parameters

- `dx`: The offset to apply in the horizontal axis.
- `dy`: The offset to apply in the vertical axis.

## Return Value

Return Value A new copy of the path with the offset applied to all points.

## See Also

### Transforming the path

- [applying(_:)](swiftui/path/applying(_:).md)
- [trimmedPath(from:to:)](swiftui/path/trimmedpath(from:to:).md)
