Type Method

contextWithFormat:

Creates a Core Graphics context configured according to the supplied format object.

Declaration

+ (CGContextRef)contextWithFormat:(UIGraphicsRendererFormat *)format;

Parameters

format

The format object that was either supplied to or created by the graphics renderer at initialization time.

Return Value

A Core Graphics context configured to represent the attributes in the format object.

Discussion

Each time the graphics renderer needs to create a new Core Graphics context, it calls this method, providing the format object supplied at initialization time.

You must override this method when you subclass UIGraphicsRenderer. Use the provided UIGraphicsRendererFormat to create and configure a CGContextRef object that is used by the renderer in the drawing routines.

See Also

Managing Graphics Contexts

+ prepareCGContext:withRendererContext:

Applies the configuration specified in the renderer context to the Core Graphics context.

+ rendererContextClass

Specifies the drawing context class used by this graphics renderer.