twelvefoldReflectedTile()
Creates a tiled image by rotating in increments of 30 degrees.
Declaration
class func twelvefoldReflectedTile() -> any CIFilter & CITwelvefoldReflectedTileReturn 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:
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 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]