Function

CGContextSetPatternPhase

Sets the pattern phase of a context.

Declaration

void CGContextSetPatternPhase(CGContextRef c, CGSize phase);

Parameters

c

The graphics context to modify.

phase

A pattern phase, specified in user space.

Discussion

The pattern phase is a translation that Core Graphics applies prior to drawing a pattern in the context. The pattern phase is part of the graphics state of a context, and the default pattern phase is (0,0). Setting the pattern phase has the effect of temporarily changing the pattern matrix of any pattern you draw. For example, setting the context’s pattern phase to (2,3) has the effect of moving the start of pattern cell tiling to the point (2,3) in default user space.

See Also

Getting and Setting Graphics State Parameters

CGContextGetInterpolationQuality

Returns the current level of interpolation quality for a graphics context.

CGContextSetFlatness

Sets the accuracy of curved paths in a graphics context.

CGContextSetInterpolationQuality

Sets the level of interpolation quality for a graphics context.

CGContextSetLineCap

Sets the style for the endpoints of lines drawn in a graphics context.

CGContextSetLineDash

Sets the pattern for dashed lines in a graphics context.

CGContextSetLineJoin

Sets the style for the joins of connected lines in a graphics context.

CGContextSetLineWidth

Sets the line width for a graphics context.

CGContextSetMiterLimit

Sets the miter limit for the joins of connected lines in a graphics context.

CGContextSetFillPattern

Sets the fill pattern in the specified graphics context.

CGContextSetRenderingIntent

Sets the rendering intent in the current graphics state.

CGContextSetShouldAntialias

Sets antialiasing on or off for a graphics context.

CGContextSetStrokePattern

Sets the stroke pattern in the specified graphics context.

CGContextSetBlendMode

Sets how sample values are composited by a graphics context.

CGContextSetAllowsAntialiasing

Sets whether or not to allow antialiasing for a graphics context.

CGContextSetAllowsFontSmoothing

Sets whether or not to allow font smoothing for a graphics context.

CGContextSetShouldSmoothFonts

Enables or disables font smoothing in a graphics context.

CGContextSetAllowsFontSubpixelPositioning

Sets whether or not to allow subpixel positioning for a graphics context.

CGContextSetShouldSubpixelPositionFonts

Enables or disables subpixel positioning in a graphics context.

CGContextSetAllowsFontSubpixelQuantization

Sets whether or not to allow subpixel quantization for a graphics context.

CGContextSetShouldSubpixelQuantizeFonts

Enables or disables subpixel quantization in a graphics context.