Contents

affineTile()

Performs a transform on the image and tiles the result.

Declaration

class func affineTile() -> any CIFilter & CIAffineTile

Return Value

The tiled image.

Discussion

This method applies the affine tile filter to an image. This effect performs an CGAffineTransform and then tiles the transformed image.

The affine tile filter uses the following properties:

inputImage

An image with the type CIImage.

transform

A CGAffineTransform to apply to the image.

The following code creates a filter that results in the image becoming tiled:

func affineTile(inputImage: CIImage) -> CIImage {
    let affineTileEffect = CIFilter.affineTile()
    affineTileEffect.inputImage = inputImage
    affineTileEffect.transform = CGAffineTransform(a: 1, b: 2, c: 2, d: 3, tx: 4, ty: 4)
    return affineTileEffect.outputImage!
}

[Image]

See Also

Filters