<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Path/union(_:eoFill:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4PathV5union_6eoFillA2C_SbtF"
  },
  "title" : "union(_:eoFill:)"
}
-->

# union(_:eoFill:)

Returns a new path with filled regions in either this path or
the given path.

```
func union(_ other: Path, eoFill: Bool = false) -> Path
```

## Parameters

`other`

The path to union.

`eoFill`

Whether to use the even-odd rule for determining
which areas to treat as the interior of the paths (if true),
or the non-zero rule (if false).

## Return Value

A new path.

## Discussion

The filled region of resulting path is the combination of the
filled region of both paths added together.

Any unclosed subpaths in either path are assumed to be closed.
The result of filling this path using either even-odd or
non-zero fill rules is identical.

---

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)