CIFilterShape Class Reference

Inherits from
Conforms to
Framework
Library/Frameworks/QuartzCore.framework
Availability
OS X v10.4 and later
Companion guide
Declared in
CIFilterShape.h
Related sample code

Overview

The CIFilterShape class describes the bounding shape of a filter and the domain of definition (DOD) of a filter operation. You use CIFilterShape objects in conjunction with Core Image classes, such as CIFilter, CIKernel, and CISampler, to create custom filters.

Tasks

Creating a Filter Shape

Initializing a Filter Shape

Modifying a Filter Shape

Class Methods

shapeWithRect:

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

+ (id)shapeWithRect:(CGRect)r
Parameters
r

A rectangle. The filter shape object will contain the smallest integral rectangle specified by this argument.

Availability
  • OS X v10.4 and later.
Related Sample Code
Declared In
CIFilterShape.h

Instance Methods

initWithRect:

Initializes a filter shape object with a rectangle.

- (id)initWithRect:(CGRect)r
Parameters
r

A rectangle. Core Image uses the rectangle specified by integer parts of the values in the CGRect data structure.

Return Value

An initialized CIFilterShape object, or nil if the method fails.

Availability
  • OS X v10.4 and later.
Declared In
CIFilterShape.h

insetByX:Y:

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

- (CIFilterShape *)insetByX:(int)dx Y:(int)dy
Parameters
dx

A value that specifies an inset in the x direction.

dy

A value that specifies an inset in the y direction.

Availability
  • OS X v10.4 and later.
Related Sample Code
Declared In
CIFilterShape.h

intersectWith:

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

- (CIFilterShape *)intersectWith:(CIFilterShape *)s2
Parameters
s2

A filter shape object.

Return Value

The filter shape object that results from the intersection.

Availability
  • OS X v10.4 and later.
Declared In
CIFilterShape.h

intersectWithRect:

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

- (CIFilterShape *)intersectWithRect:(CGRect)r
Parameters
rect

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

Availability
  • OS X v10.4 and later.
Declared In
CIFilterShape.h

transformBy:interior:

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

- (CIFilterShape *)transformBy:(CGAffineTransform)m interior:(BOOL)flag
Parameters
m

A transform.

flag

NO specifies that the new filter shape object can contain all the pixels in the transformed shape (and possibly some that are outside the transformed shape). YES specifies that the new filter shape object can contain a subset of the pixels in the transformed shape (but none of those outside the transformed shape).

Return Value

The transformed filter shape object.

Availability
  • OS X v10.4 and later.
Declared In
CIFilterShape.h

unionWith:

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

- (CIFilterShape *)unionWith:(CIFilterShape *)s2
Parameters
s2

A filter shape object.

Return Value

The filter shape object that results from the union.

Availability
  • OS X v10.4 and later.
Declared In
CIFilterShape.h

unionWithRect:

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

- (CIFilterShape *)unionWithRect:(CGRect)r
Parameters
rect

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

Availability
  • OS X v10.4 and later.
Related Sample Code
Declared In
CIFilterShape.h