<!--
{
  "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/Shape/lineSubtraction(_:eoFill:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI5ShapePAAE15lineSubtraction_6eoFillQrqd___SbtAaBRd__lF"
  },
  "title" : "lineSubtraction(_:eoFill:)"
}
-->

# lineSubtraction(_:eoFill:)

Returns a new shape with a line from this shape that does not
overlap the filled region of the given shape.

```
@export(implementation) nonisolated func lineSubtraction<T>(_ other: T, eoFill: Bool = false) -> some Shape where T : Shape
```

## Parameters

`other`

The shape to subtract.

`eoFill`

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

## Return Value

A new shape.

## Discussion

The line of the resulting shape is the line of this shape that
does not overlap the filled region of `other`.

Intersected subpaths that are clipped create open subpaths.
Closed subpaths that do not intersect `other` remain closed.

---

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)