---
title: sourceRect
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/imagepaint/sourcerect
---

# sourceRect

A unit-space rectangle defining how much of the source image to draw.

## Declaration

```swift
var sourceRect: CGRect
```

## Discussion

Discussion The results are undefined if this rectangle selects areas outside the [0, 1] range in either axis.

## See Also

### Configuring the image paint style

- [image](swiftui/imagepaint/image.md)
- [scale](swiftui/imagepaint/scale.md)
