---
title: CGLayer
framework: coregraphics
role: symbol
role_heading: Class
path: coregraphics/cglayer
---

# CGLayer

An offscreen context for reusing content drawn with Core Graphics.

## Declaration

```swift
class CGLayer
```

## Topics

### Creating Layer Objects

- [init(_:size:auxiliaryInfo:)](coregraphics/cglayer/init(_:size:auxiliaryinfo:).md)

### Examining a Layer

- [context](coregraphics/cglayer/context.md)
- [size](coregraphics/cglayer/size.md)

### Working with Core Foundation Types

- [typeID](coregraphics/cglayer/typeid.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### 2D Drawing

- [CGContext](coregraphics/cgcontext.md)
- [CGImage](coregraphics/cgimage.md)
- [CGPath](coregraphics/cgpath.md)
- [CGMutablePath](coregraphics/cgmutablepath.md)
