<!--
{
  "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/InsettableShape",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15InsettableShapeP"
  },
  "title" : "InsettableShape"
}
-->

# InsettableShape

A shape type that is able to inset itself to produce another shape.

```
protocol InsettableShape : Shape
```

## Topics

### Setting the stroke border characteristics

[`strokeBorder(_:lineWidth:antialiased:)`](/documentation/SwiftUI/InsettableShape/strokeBorder(_:lineWidth:antialiased:))

Returns a view that is the result of filling the `lineWidth`-sized
border (aka inner stroke) of `self` with `content`. This is
equivalent to insetting `self` by `lineWidth / 2` and stroking the
resulting shape with `lineWidth` as the line-width.

[`strokeBorder(lineWidth:antialiased:)`](/documentation/SwiftUI/InsettableShape/strokeBorder(lineWidth:antialiased:))

Returns a view that is the result of filling the `lineWidth`-sized
border (aka inner stroke) of `self` with the foreground color.
This is equivalent to insetting `self` by `lineWidth / 2` and
stroking the resulting shape with `lineWidth` as the line-width.

[`strokeBorder(_:style:antialiased:)`](/documentation/SwiftUI/InsettableShape/strokeBorder(_:style:antialiased:))

Returns a view that is the result of insetting `self` by
`style.lineWidth / 2`, stroking the resulting shape with
`style`, and then filling with `content`.

[`strokeBorder(style:antialiased:)`](/documentation/SwiftUI/InsettableShape/strokeBorder(style:antialiased:))

Returns a view that is the result of insetting `self` by
`style.lineWidth / 2`, stroking the resulting shape with
`style`, and then filling with the foreground color.

### Setting the inset

[`inset(by:)`](/documentation/SwiftUI/InsettableShape/inset(by:))

Returns `self` inset by `amount`.

[`InsetShape`](/documentation/SwiftUI/InsettableShape/InsetShape)

The type of the inset shape.



---

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)