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

# imageRect(forBounds:)

Returns the rectangle in which the receiver draws its image.

## Declaration

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

## Parameters

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

## Return Value

Return Value The rectangle in which the receiver draws its image. This rectangle is slightly offset from the one in theRect.

## See Also

### Determining Cell Size

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