<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilterShape"
  },
  "title" : "CIFilterShape"
}
-->

# CIFilterShape

A description of the bounding shape of a filter and the domain of definition for a filter operation.

```
class CIFilterShape
```

## Overview

You use `CIFilterShape` objects in conjunction with Core Image classes, such as [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class), [`CIKernel`](/documentation/CoreImage/CIKernel), and [`CISampler`](/documentation/CoreImage/CISampler), to create custom filters.

## Topics

### Creating a Filter Shape

[`+  shapeWithRect:`](/documentation/CoreImage/CIFilterShape/shapeWithRect:)

Creates a filter shape object and initializes it with a rectangle.

### Initializing a Filter Shape

[`-  initWithRect:`](/documentation/CoreImage/CIFilterShape/init(rect:))

Initializes a filter shape object with a rectangle.

### Inspecting a Filter Shape

[`extent`](/documentation/CoreImage/CIFilterShape/extent)

The extent of the filter shape.

### Modifying a Filter Shape

[`-  insetByX:Y:`](/documentation/CoreImage/CIFilterShape/insetBy(x:y:))

Modifies a filter shape object so that it is inset by the specified x and y values.

[`-  intersectWith:`](/documentation/CoreImage/CIFilterShape/intersect(with:)-8iw)

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

[`-  intersectWithRect:`](/documentation/CoreImage/CIFilterShape/intersect(with:)-2o2n8)

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

[`-  transformBy:interior:`](/documentation/CoreImage/CIFilterShape/transform(by:interior:))

Creates a filter shape that results from applying a transform to the current filter shape.

[`-  unionWith:`](/documentation/CoreImage/CIFilterShape/union(with:)-52mnd)

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

[`-  unionWithRect:`](/documentation/CoreImage/CIFilterShape/union(with:)-75ebo)

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

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)