Contents

fourfoldReflectedTile()

Creates a four-way reflected pattern.

Declaration

class func fourfoldReflectedTile() -> any CIFilter & CIFourfoldReflectedTile

Return Value

The tiled image.

Discussion

This method applies the four-fold reflected tile filter to an image. The effect produces a four-way reflected tile image.

The four-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.

acute angle

A float representing the primary angle for the repeating parallelogram tile as an NSNumber.

The following code creates a filter that results in a four-fold pattern:

func fourFoldReflected(inputImage: CIImage) -> CIImage {
    let fourFoldReflectedTile = CIFilter.fourfoldReflectedTile()
    fourFoldReflectedTile.inputImage = inputImage
    fourFoldReflectedTile.center = CGPoint(x: 150, y: 150)
    fourFoldReflectedTile.width = 10
    fourFoldReflectedTile.angle = 7
    fourFoldReflectedTile.acuteAngle = 1
    return fourFoldReflectedTile.outputImage!
}

[Image]

See Also

Filters