Creates a pattern object.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Graphics
A pointer to private storage used by your pattern drawing function, or
NULL. For more information, see the discussion below.
The bounding box of the pattern cell, specified in pattern space. (Pattern space is an abstract space that maps to the default user space by the transformation matrix you specify with the
matrixparameter.) The drawing done in your pattern drawing function is clipped to this rectangle.
A matrix that represents a transform from pattern space to the default user space of the context in which the pattern is used. If no transform is needed, pass the identity matrix.
The horizontal displacement between cells, specified in pattern space. For no additional horizontal space between cells (so that each pattern cells abuts the previous pattern cell in the horizontal direction), pass the width of the pattern cell.
The vertical displacement between cells, specified in pattern space. For no additional vertical space between cells (so that each pattern cells abuts the previous pattern cell in the vertical direction), pass the height of the pattern cell.
CGPatternconstant that specifies the desired tiling method.
If you want to draw your pattern using its own intrinsic color, pass
true. If you want to draw an uncolored (or masking) pattern that uses the fill or stroke color in the graphics state, pass
A pointer to a pattern callback function table—your pattern drawing function is an entry in this table. See
CGPatternfor more information about callback function tables for patterns.
A new Core Graphics pattern.
You are responsible for releasing this object using
Core Graphics calls your drawing function at the appropriate time to draw the pattern cell. A pattern cell must be invariant—that is, the pattern cell should be drawn exactly the same way each time the drawing function is called.
The appearance of a pattern cell is unaffected by changes in the graphics state of the context in which the pattern is used.
more information about pattern drawing functions.