Function

CGContextDrawLayerInRect

Draws the contents of a layer object into the specified rectangle.

Declaration

void CGContextDrawLayerInRect(CGContextRef context, CGRect rect, CGLayerRef layer);

Parameters

context

The graphics context associated with the layer.

rect

The rectangle, in current user space coordinates, to draw to.

layer

The layer whose contents you want to draw.

Discussion

The contents are scaled, if necessary, to fit into the rectangle.

See Also

Drawing Layer Content

CGContextDrawLayerAtPoint

Draws the contents of a CGLayer object at the specified point.

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