Contents

fourfoldRotatedTile()

Creates a tiled image by rotating a tile in increments of 90 degrees.

Declaration

class func fourfoldRotatedTile() -> any CIFilter & CIFourfoldRotatedTile

Return Value

The tiled image.

Discussion

This method applies the four-fold rotated tile filter to an image. The effect produces a tiled image by rotating a tile from the iput image in increments of 90 degrees.

The four-fold rotated 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 the flowers in the input image becoming rotated by 90 degrees and tiled:

func fourFoldRotated(inputImage: CIImage) -> CIImage {
    let fourFoldRotatedTile = CIFilter.fourfoldRotatedTile()
    fourFoldRotatedTile.inputImage = inputImage
    fourFoldRotatedTile.center = CGPoint(x: 150, y: 150)
    fourFoldRotatedTile.angle = 10
    fourFoldRotatedTile.width = 10
    return fourFoldRotatedTile.outputImage!
}

[Image]

See Also

Filters