---
title: "NSDrawWindowBackground(_:)"
framework: appkit
role: symbol
role_heading: Function
path: "appkit/nsdrawwindowbackground(_:)"
---

# NSDrawWindowBackground(_:)

Draws the window’s default background pattern into the specified rectangle of the currently focused view.

## Declaration

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

## Parameters

- `rect`: The rectangle (in the current coordinate system) in which to draw the window’s background pattern.

## See Also

### Drawing Backgrounds

- [NSDrawButton(_:_:)](appkit/nsdrawbutton(_:_:).md)
