appendRoundedRect(_:xRadius:yRadius:)
Appends a rounded rectangular path to the path.
Declaration
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
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
Appending Common Shapes to a Path
append(_:)appendPoints(_:count:)appendOval(in:)appendArc(from:to:radius:)appendArc(withCenter:radius:startAngle:endAngle:)appendArc(withCenter:radius:startAngle:endAngle:clockwise:)appendRect(_:)append(withCGGlyph:in:)append(withCGGlyphs:count:in:)appendGlyph(_:in:)appendGlyphs(_:count:in:)appendPackedGlyphs(_:)