---
title: "intersect(with:)"
framework: coreimage
role: symbol
role_heading: Instance Method
path: "coreimage/cifiltershape/intersect(with:)-2o2n8"
---

# intersect(with:)

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

## Declaration

```swift
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

Return Value The filter shape that results from the intersection

## See Also

### Modifying a Filter Shape

- [insetBy(x:y:)](coreimage/cifiltershape/insetby(x:y:).md)
- [intersect(with:)](coreimage/cifiltershape/intersect(with:)-8iw.md)
- [transform(by:interior:)](coreimage/cifiltershape/transform(by:interior:).md)
- [union(with:)](coreimage/cifiltershape/union(with:)-52mnd.md)
- [union(with:)](coreimage/cifiltershape/union(with:)-75ebo.md)
