Contents

beginTransparencyLayer(auxiliaryInfo:)

Begins a transparency layer.

Declaration

func beginTransparencyLayer(auxiliaryInfo: CFDictionary?)

Parameters

  • auxiliaryInfo:

    A dictionary that specifies any additional information, or NULL.

Discussion

Until a corresponding call to endTransparencyLayer(), all subsequent drawing operations in the specified context are composited into a fully transparent backdrop (which is treated as a separate destination buffer from the context).

After a call to CGContextEndTransparencyLayer, the result is composited into the context using the global alpha and shadow state of the context. This operation respects the clipping region of the context.

After a call to this function, all of the parameters in the graphics state remain unchanged with the exception of the following:

  • The global alpha is set to 1.

  • The shadow is turned off.

Ending the transparency layer restores these parameters to their previous values. Core Graphics maintains a transparency layer stack for each context, and transparency layers may be nested.

See Also

Working with Transparency Layers