Twirl

public struct Twirl: Filter

Rotates pixels around a point to give a twirling effect.

let logo = Image("logo")
logo.apply(Twirl())
canvas.add(logo)
  • The name of the Core Image filter.

    Declaration

    Swift

    public let filterName = "CITwirlDistortion"
  • The center of the twirl effet. Defaults to {0,0}

    Declaration

    Swift

    public var center: Point = Point()
  • The radius of the twirl effect. Defaults to 100.o

    Declaration

    Swift

    public var radius: Double = 100.0
  • The angle of the twirl effect. Defaults to 𝞹

    Declaration

    Swift

    public var angle: Double = M_PI
  • Initializes a new filter

    Declaration

    Swift

    public init() {}
  • Applies the properties of the receiver to create a new CIFilter object

    Declaration

    Swift

    public func createCoreImageFilter(inputImage: CIImage) -> CIFilter

    Parameters

    inputImage

    The image to use as input to the filter.

    Return Value

    The new CIFilter object.