Contents

glideReflectedTile()

Tiles an image by rotating and reflecting a tile from the image.

Declaration

class func glideReflectedTile() -> any CIFilter & CIGlideReflectedTile

Return Value

The tiled image.

Discussion

This method applies the glide reflected tile filter to an image. The effect produces a tiled image by rotating and reflecting a tile from the input image.

The glide 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 flipping the image and then tiling the result:

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

[Image]

See Also

Filters