Contents

twelvefoldReflectedTile()

Creates a tiled image by rotating in increments of 30 degrees.

Declaration

class func twelvefoldReflectedTile() -> any CIFilter & CITwelvefoldReflectedTile

Return Value

The tiled image.

Discussion

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

The 12-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 a 12-fold pattern angled at 30 degrees and then repeated:

func twelveFoldReflected(inputImage: CIImage) -> CIImage {
    let twelveFoldReflectedTile = CIFilter.twelvefoldReflectedTile()
    twelveFoldReflectedTile.inputImage = inputImage
    twelveFoldReflectedTile.center = CGPoint(x: 150, y: 150)
    twelveFoldReflectedTile.angle = 0
    twelveFoldReflectedTile.width = 100
    return twelveFoldReflectedTile.outputImage!
}

[Image]

See Also

Filters