Type Alias

CGPatternDrawPatternCallback

Draws a pattern cell.

Declaration

typedef void (*CGPatternDrawPatternCallback)(void *info, CGContextRef context);

Parameters

info

A generic pointer to private data associated with the pattern. This is the same pointer you supplied to CGPatternCreate.

context

The graphics context for drawing the pattern cell.

Discussion

When a pattern is used to stroke or fill a graphics path, Quartz calls your custom drawing function at the appropriate time to draw the pattern cell. The cell should be drawn exactly the same way each time the drawing function is called.

In a drawing function associated with an uncolored pattern, you should not attempt to set a stroke or fill color or color space—if you do so, the result is undefined.

To learn how to associate your drawing function with a Quartz pattern, see CGPatternCreate and CGPatternCallbacks.

See Also

Callbacks

CGPatternReleaseInfoCallback

Release private data or resources associated with the pattern.