---
title: "clip(_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsbezierpath/clip(_:)"
---

# clip(_:)

Intersects the specified rectangle with the clipping path of the current graphics context and makes the resulting shape the current clipping path.

## Declaration

```swift
class func clip(_ rect: NSRect)
```

## Parameters

- `rect`: The rectangle to intersect with the current clipping path.

## See Also

### Specifying a Clipping Path

- [addClip()](appkit/nsbezierpath/addclip().md)
- [setClip()](appkit/nsbezierpath/setclip().md)
