Contents

sixfoldRotatedTile()

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

Declaration

class func sixfoldRotatedTile() -> any CIFilter & CISixfoldRotatedTile

Return Value

The tiled image.

Discussion

This method applies the six-fold reflected tile filter to an image. The effect produces a tiled image by rotating the image in increments 60 degrees.

The six-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 flowers in the input image becoming rotated by 60 degrees and tiled to create the output:

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

[Image]

See Also

Filters