Contents

eightfoldReflectedTile()

Creates an eight-way reflected pattern.

Declaration

class func eightfoldReflectedTile() -> any CIFilter & CIEightfoldReflectedTile

Return Value

The tiled image.

Discussion

This method applies the eight-fold reflected tile filter to an image. The effect creates an eight-way symmetry from the input image and tiles it to create the output image.

The eight-fold reflected tile filter uses the following properties:

inputImage

An image with the type CIImage.

center

A set of coordinates marking the center of the image as a CGPoint.

angle

A float representing the direction of distortion, in radians as an NSNumber.

width

A float representing the set width of each tile as an NSNumber.

The following code creates a filter that results in small symmetrical repeated tiles:

func eightFoldReflected(inputImage: CIImage) -> CIImage {
    let eightFoldReflectedTile = CIFilter.eightfoldReflectedTile()
    eightFoldReflectedTile.inputImage = inputImage
    eightFoldReflectedTile.center = CGPoint(x: inputImage.extent.midX, y: inputImage.extent.midY)
    eightFoldReflectedTile.width = 400
    eightFoldReflectedTile.angle = 1
    return eightFoldReflectedTile.outputImage!
}

[Image]

See Also

Filters