<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSImageHistogram/clipRectSource",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSImageHistogram(py)clipRectSource"
  },
  "title" : "clipRectSource"
}
-->

# clipRectSource

The source rectangle to use when reading data.

```
var clipRectSource: MTLRegion { get set }
```

## Discussion

This value indicates which part of the source image to read from. If the value of `clipRectSource` does not lie completely within the source image, then the intersection of the image bounds and the value of `clipRectSource` will be used. The value of `clipRectSource` replaces the [`offset`](/documentation/MetalPerformanceShaders/MPSUnaryImageKernel/offset) value for this filter, which is ignored.

The default value is [`MPSRectNoClip`](/documentation/MetalPerformanceShaders/MPSRectNoClip), indicating that the entire source texture is used.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)