glideReflectedTile()
Tiles an image by rotating and reflecting a tile from the image.
Declaration
class func glideReflectedTile() -> any CIFilter & CIGlideReflectedTileReturn 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:
inputImageAn image with the type CIImage.
centerA set of coordinates marking the center of the image as a CGPoint.
angleA
floatrepresenting the direction of distortion, in radians as an NSNumber.widthA
floatrepresenting 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]