---
title: clip()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/sequence/clip()
---

# clip()

Modifies the current graphics context clipping path by intersecting it with the graphical union of this list of rects This permanently modifies the graphics state, so the current state should be saved beforehand and restored afterwards.

## Declaration

```swift
func clip()
```

## Discussion

Discussion note: There must be a set current NSGraphicsContext.

## See Also

### Applying AppKit Graphic Operations

- [fill(using:)](swift/sequence/fill(using:)-l1te.md)
- [fill(using:)](swift/sequence/fill(using:)-45en6.md)
