---
title: UIGraphicsRendererContext
framework: uikit
role: symbol
role_heading: Class
path: uikit/uigraphicsrenderercontext
---

# UIGraphicsRendererContext

The base class for the drawing environments for graphics renderers.

## Declaration

```swift
class UIGraphicsRendererContext
```

## Overview

Overview You don’t create instances of UIGraphicsRendererContext yourself. Instead, when you use a concrete subclass of UIGraphicsRenderer, you are provided an instance of the appropriate UIGraphicsRendererContext subclass—either UIGraphicsImageRendererContext or UIGraphicsPDFRendererContext—as an argument to a UIGraphicsDrawingActions drawing actions block. UIGraphicsRendererContext objects provide high-level drawing methods in addition to access to the underlying Core Graphics context.

## Topics

### Getting the drawing context

- [cgContext](uikit/uigraphicsrenderercontext/cgcontext.md)
- [format](uikit/uigraphicsrenderercontext/format.md)

### Drawing content

- [stroke(_:)](uikit/uigraphicsrenderercontext/stroke(_:).md)
- [stroke(_:blendMode:)](uikit/uigraphicsrenderercontext/stroke(_:blendmode:).md)
- [fill(_:blendMode:)](uikit/uigraphicsrenderercontext/fill(_:blendmode:).md)
- [fill(_:)](uikit/uigraphicsrenderercontext/fill(_:).md)

### Applying a clipping rectangle

- [clip(to:)](uikit/uigraphicsrenderercontext/clip(to:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [UIGraphicsImageRendererContext](uikit/uigraphicsimagerenderercontext.md)
- [UIGraphicsPDFRendererContext](uikit/uigraphicspdfrenderercontext.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Graphics contexts

- [UIGraphicsRenderer](uikit/uigraphicsrenderer.md)
- [UIGraphicsRendererFormat](uikit/uigraphicsrendererformat.md)
- [UIGraphicsImageRenderer](uikit/uigraphicsimagerenderer.md)
- [UIGraphicsImageRendererContext](uikit/uigraphicsimagerenderercontext.md)
- [UIGraphicsImageRendererFormat](uikit/uigraphicsimagerendererformat.md)
- [UIGraphicsPDFRenderer](uikit/uigraphicspdfrenderer.md)
- [UIGraphicsPDFRendererContext](uikit/uigraphicspdfrenderercontext.md)
- [UIGraphicsPDFRendererFormat](uikit/uigraphicspdfrendererformat.md)
