<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilterShape/intersect(with:)-2o2n8",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilterShape(im)intersectWithRect:"
  },
  "title" : "intersect(with:)"
}
-->

# intersect(with:)

Creates a filter shape that represents the intersection of the current filter shape and a rectangle.

```
func intersect(with r: CGRect) -> CIFilterShape
```

## Parameters

`r`

A rectangle. Core Image uses the rectangle specified by integer parts of the width and height.

## Return Value

The filter shape that results from the intersection

## Discussion

---

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)