Function

CGLayerGetContext

Returns the graphics context associated with a layer object.

Declaration

CGContextRef CGLayerGetContext(CGLayerRef layer);

Parameters

layer

The layer whose graphics context you want to obtain.

Return Value

The graphics context associated with the layer.

Discussion

The context that’s returned is the context for the layer itself, not the context that you specified when you created the layer.

See Also

Getting Layer Information

CGLayerGetSize

Returns the width and height of a layer object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software