A structure that holds a version and two callback functions for drawing a custom pattern.


struct CGPatternCallbacks


You supply a CGPatternCallbacks structure to the function init(info:bounds:matrix:xStep:yStep:tiling:isColored:callbacks:) to create a data provider for direct access. The functions specified by the CGPatternCallbacks structure are responsible for drawing the pattern and for handling the pattern’s memory management.


Instance Properties

var drawPattern: CGPatternDrawPatternCallback?

A pointer to a custom function that draws the pattern. For information about this callback function, see CGPatternDrawPatternCallback.

var releaseInfo: CGPatternReleaseInfoCallback?

An optional pointer to a custom function that’s invoked when the pattern is released. CGPatternReleaseInfoCallback.

var version: UInt32

The version of the structure passed in as a parameter to the init(info:bounds:matrix:xStep:yStep:tiling:isColored:callbacks:). For this version of the structure, you should set this value to zero.