Mac Developer Library

Developer

QuartzCore Framework Reference CIFilterShape Class Reference

Options
Deployment Target:

On This Page
Language:

CIFilterShape

Inheritance


Conforms To


Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


OS X v10.4 and later

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.

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

    Declaration

    Swift

    class func shapeWithRect(_ r: CGRect) -> AnyObject!

    Objective-C

    + (id)shapeWithRect:(CGRect)r

    Parameters

    r

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

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Initializes a filter shape object with a rectangle.

    Declaration

    Swift

    init!(rect r: CGRect)

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

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

    Declaration

    Swift

    func insetByX(_ dx: Int32, y dy: Int32) -> CIFilterShape!

    Objective-C

    - (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.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

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

    Declaration

    Swift

    func intersectWith(_ s2: CIFilterShape!) -> CIFilterShape!

    Objective-C

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

    Parameters

    s2

    A filter shape object.

    Return Value

    The filter shape object that results from the intersection.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

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

    Declaration

    Swift

    func intersectWithRect(_ rect: CGRect) -> CIFilterShape!

    Objective-C

    - (CIFilterShape *)intersectWithRect:(CGRect)rect

    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

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

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

    Declaration

    Swift

    func transformBy(_ m: CGAffineTransform, interior flag: Bool) -> CIFilterShape!

    Objective-C

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

    Parameters

    m

    A transform.

    flag

    NOfalse 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). YEStrue 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.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

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

    Declaration

    Swift

    func unionWith(_ s2: CIFilterShape!) -> CIFilterShape!

    Objective-C

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

    Parameters

    s2

    A filter shape object.

    Return Value

    The filter shape object that results from the union.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

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

    Declaration

    Swift

    func unionWithRect(_ rect: CGRect) -> CIFilterShape!

    Objective-C

    - (CIFilterShape *)unionWithRect:(CGRect)rect

    Parameters

    rect

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

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

    See Also

    – unionWith: