Contents

draw(_:in:)

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

Declaration

func draw(_ layer: CGLayer, in rect: CGRect)

Parameters

  • layer:

    The layer whose contents you want to draw.

  • rect:

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

Discussion

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

See Also

Drawing Core Graphics Layers