<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Path/init(roundedRect:cornerRadii:style:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4PathV11roundedRect11cornerRadii5styleACSo6CGRectV_AA015RectangleCornerG0VAA07RoundedK5StyleOtcfc"
  },
  "title" : "init(roundedRect:cornerRadii:style:)"
}
-->

# init(roundedRect:cornerRadii:style:)

Creates a path as the given rounded rectangle, which may have
uneven corner radii.

```
init(roundedRect rect: CGRect, cornerRadii: RectangleCornerRadii, style: RoundedCornerStyle = .continuous)
```

## Parameters

`rect`

A rectangle, specified in user space coordinates.

`cornerRadii`

The radius of each corner of the rectangle,
specified in user space coordinates.

`style`

The corner style. Defaults to the `continous` style
if not specified.

## Discussion

This is a convenience function that creates a path of a rounded
rectangle. Using this function is more efficient than creating
a path and adding a rounded rectangle to it.

---

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)