Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Filter

Filter

An opaque type that wraps a system specific filter. Currently only CoreImage/CIFilter(s) are supported on iOS and macOS.

Filter Reference: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html

Almost all CIFilter(s) are available and supported except for filters that have NSData inputs.

To use a Filter you need first need to create it by passing one of the supported filter names from: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html.

example:

code

// Create a blur filter. let blurFilter = Filter ("CIBoxBlur");

endcode

To set parameters you must call the setValue (value, key); method.

code

// Set the "inputRadius" for "CIBoxBlur" filter. blurFilter.setValue (12.0, "inputRadius");

endcode

You can retrieve parameters you've set by calling the getValue (key); method.

Hierarchy

  • Filter

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Filter(name: string): Filter
  • Creates a Filter object with a specified name.

    param.

    fileName

    Parameters

    • name: string

    Returns Filter

Properties

name

name: string

Gets the name of this filter.

Methods

getValue

  • getValue(key: string): any
  • Gets a value for the specified key.

    Parameters

    • key: string

    Returns any

setValue

  • setValue(value: any, key: string): void
  • Sets the specified value for the specified key.

    Parameters

    • value: any
    • key: string

    Returns void

Generated using TypeDoc