<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Path/offsetBy(dx:dy:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4PathV8offsetBy2dx2dyAC14CoreFoundation7CGFloatV_AItF"
  },
  "title" : "offsetBy(dx:dy:)"
}
-->

# offsetBy(dx:dy:)

Returns a path constructed by translating all its points.

```
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

a new copy of the path with the offset applied to
all points.

---

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)