---
title: "union(with:)"
framework: coreimage
role: symbol
role_heading: Instance Method
path: "coreimage/cifiltershape/union(with:)-75ebo"
---

# union(with:)

Creates a filter shape that results from the union of the current filter shape and a rectangle.

## Declaration

```swift
func union(with r: CGRect) -> CIFilterShape
```

## Parameters

- `r`: A rectangle. Core Image uses the rectangle specified by integer parts of the width and height.

## See Also

### Modifying a Filter Shape

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