---
title: "drawingRect(forBounds:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscell/drawingrect(forbounds:)"
---

# drawingRect(forBounds:)

Returns the rectangle within which the receiver draws itself

## Declaration

```swift
func drawingRect(forBounds rect: NSRect) -> NSRect
```

## Parameters

- `rect`: The bounding rectangle of the receiver.

## Return Value

Return Value The rectangle in which the receiver draws itself. This rectangle is slightly inset from the one in theRect.

## See Also

### Related Documentation

- [calcSize()](appkit/nscontrol/calcsize().md)

### Determining Cell Size

- [calcDrawInfo(_:)](appkit/nscell/calcdrawinfo(_:).md)
- [cellSize](appkit/nscell/cellsize.md)
- [cellSize(forBounds:)](appkit/nscell/cellsize(forbounds:).md)
- [imageRect(forBounds:)](appkit/nscell/imagerect(forbounds:).md)
- [titleRect(forBounds:)](appkit/nscell/titlerect(forbounds:).md)
- [controlSize](appkit/nscell/controlsize.md)
