Checkerboard

public struct Checkerboard: Generator

Generates a checkerboard pattern

let image = Image(frame: canvas.frame)
image.generate(Checkerboard())
canvas.add(image)
  • The name of the Core Image filter.

    Declaration

    Swift

    public let filterName = "CICheckerboardGenerator"
  • The colors of the checkerboard. Defaults to: [C4Pink, C4Blue]

    Declaration

    Swift

    public var colors: [Color] = [C4Pink, C4Blue]
  • The center of the pattern. Defaults to {0,0}

    Declaration

    Swift

    public var center: Point = Point()
  • The sharpness of the pattern’s edges. Defaults to 1.0

    Declaration

    Swift

    public var sharpness: Double = 1
  • The width of the pattern’s segments. Defaults to 5.0

    Declaration

    Swift

    public var width: Double = 5.0
  • Initializes a new filter

    Declaration

    Swift

    public init() {}
  • Applies the properties of the receiver to create a new CIFilter object

    Declaration

    Swift

    public func createCoreImageFilter() -> CIFilter

    Return Value

    The new CIFilter object.