---
title: "NSEraseRect(_:)"
framework: appkit
role: symbol
role_heading: Function
path: "appkit/nseraserect(_:)"
---

# NSEraseRect(_:)

Erases the specified rect by filling it with white.

## Declaration

```swift
func NSEraseRect(_ rect: NSRect)
```

## Parameters

- `rect`: The rectangle (in the current coordinate system) defining the area to erase.

## Discussion

Discussion This function fills the specified rectangle with white. It does not alter the current color.

## See Also

### Drawing Rectangles

- [NSDrawTiledRects(_:_:_:_:_:)](appkit/nsdrawtiledrects(_:_:_:_:_:).md)
- [NSDrawGroove(_:_:)](appkit/nsdrawgroove(_:_:).md)
