---
title: "beginTransparencyLayer(auxiliaryInfo:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/begintransparencylayer(auxiliaryinfo:)"
---

# beginTransparencyLayer(auxiliaryInfo:)

Begins a transparency layer.

## Declaration

```swift
func beginTransparencyLayer(auxiliaryInfo: CFDictionary?)
```

## Parameters

- `auxiliaryInfo`: A dictionary that specifies any additional information, or NULL.

## Discussion

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. tip: For best performance, make sure that you set the smallest possible clipping area for the objects in the transparency layer prior to calling CGContextBeginTransparencyLayer.

## See Also

### Working with Transparency Layers

- [beginTransparencyLayer(in:auxiliaryInfo:)](coregraphics/cgcontext/begintransparencylayer(in:auxiliaryinfo:).md)
- [endTransparencyLayer()](coregraphics/cgcontext/endtransparencylayer().md)
