---
title: sourceRect
framework: screencapturekit
role: symbol
role_heading: Instance Property
path: screencapturekit/scscreenshotconfiguration/sourcerect
---

# sourceRect

A rectangle that specifies that the screenshot only samples a subset of the frame input.

## Declaration

```swift
var sourceRect: CGRect { get set }
```

## Discussion

Discussion If not set, the screenshot captures the entire frame. Specify the rectangle in points in the display’s logical coordinate system.
