---
title: "appendRoundedRect(_:xRadius:yRadius:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbezierpath/appendroundedrect(_:xradius:yradius:)"
---

# appendRoundedRect(_:xRadius:yRadius:)

Appends a rounded rectangular path to the path.

## Declaration

```swift
func appendRoundedRect(_ rect: NSRect, xRadius: CGFloat, yRadius: CGFloat)
```

## Parameters

- `rect`: The rectangle that defines the basic shape of the path.
- `xRadius`: The radius of each corner oval along the x-axis. Values larger than half the rectangle’s width are clamped to half the width.
- `yRadius`: The radius of each corner oval along the y-axis. Values larger than half the rectangle’s height are clamped to half the height.

## Discussion

Discussion The path is constructed in a counter-clockwise direction, starting at the top-left corner of the rectangle. If either one of the radius parameters contains the value 0.0, the returned path is a plain rectangle without rounded corners.

## See Also

### Related Documentation

- [init(roundedRect:xRadius:yRadius:)](appkit/nsbezierpath/init(roundedrect:xradius:yradius:).md)

### Appending Common Shapes to a Path

- [append(_:)](appkit/nsbezierpath/append(_:).md)
- [appendPoints(_:count:)](appkit/nsbezierpath/appendpoints(_:count:).md)
- [appendOval(in:)](appkit/nsbezierpath/appendoval(in:).md)
- [appendArc(from:to:radius:)](appkit/nsbezierpath/appendarc(from:to:radius:).md)
- [appendArc(withCenter:radius:startAngle:endAngle:)](appkit/nsbezierpath/appendarc(withcenter:radius:startangle:endangle:).md)
- [appendArc(withCenter:radius:startAngle:endAngle:clockwise:)](appkit/nsbezierpath/appendarc(withcenter:radius:startangle:endangle:clockwise:).md)
- [appendRect(_:)](appkit/nsbezierpath/appendrect(_:).md)
- [append(withCGGlyph:in:)](appkit/nsbezierpath/append(withcgglyph:in:).md)
- [append(withCGGlyphs:count:in:)](appkit/nsbezierpath/append(withcgglyphs:count:in:).md)
- [appendGlyph(_:in:)](appkit/nsbezierpath/appendglyph(_:in:).md)
- [appendGlyphs(_:count:in:)](appkit/nsbezierpath/appendglyphs(_:count:in:).md)
- [appendPackedGlyphs(_:)](appkit/nsbezierpath/appendpackedglyphs(_:).md)
