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.