---
title: Core Graphics
framework: Core Graphics
role: collection
role_heading: Framework
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, macOS 10.8+, tvOS 9.0+, visionOS 1.0+, watchOS 2.0+]
path: coregraphics
---

# Core Graphics

Harness the power of Quartz technology to perform lightweight 2D rendering with high-fidelity output. Handle path-based drawing, antialiased rendering, gradients, images, color management, PDF documents, and more.

## Overview

Overview The Core Graphics framework is based on the Quartz advanced drawing engine. It provides low-level, lightweight 2D rendering with unmatched output fidelity. You use this framework to handle path-based drawing, transformations, color management, offscreen rendering, patterns, gradients and shadings, image data management, image creation, and image masking, as well as PDF document creation, display, and parsing. In macOS, Core Graphics also includes services for working with display hardware, low-level user input events, and the windowing system.

## Topics

### Geometric Data Types

- [CGFloat](corefoundation/cgfloat-swift.struct.md)
- [CGPoint](corefoundation/cgpoint.md)
- [CGSize](corefoundation/cgsize.md)
- [CGRect](corefoundation/cgrect.md)
- [CGVector](corefoundation/cgvector.md)
- [CGAffineTransform](corefoundation/cgaffinetransform.md)

### 2D Drawing

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

### Colors and Fonts

- [CGColor](coregraphics/cgcolor.md)
- [CGColorConversionInfo](coregraphics/cgcolorconversioninfo.md)
- [CGColorSpace](coregraphics/cgcolorspace.md)
- [CGFont](coregraphics/cgfont.md)

### Working with PDF Documents

- [CGPDFDocument](coregraphics/cgpdfdocument.md)

### Utility and Support Classes

- [CGDataConsumer](coregraphics/cgdataconsumer.md)
- [CGDataProvider](coregraphics/cgdataprovider.md)
- [CGShading](coregraphics/cgshading.md)
- [CGGradient](coregraphics/cggradient.md)
- [CGFunction](coregraphics/cgfunction.md)
- [CGPattern](coregraphics/cgpattern.md)

### Services

- [Quartz Display Services](coregraphics/quartz-display-services.md)
- [Quartz Event Services](coregraphics/quartz-event-services.md)
- [Quartz Window Services](coregraphics/quartz-window-services.md)

### Reference

- [Core Graphics Structures](coregraphics/core-graphics-structures.md)
- [Core Graphics Enumerations](coregraphics/core-graphics-enumerations.md)
- [Core Graphics Constants](coregraphics/core-graphics-constants.md)
- [Core Graphics Functions](coregraphics/core-graphics-functions.md)
- [Core Graphics Data Types](coregraphics/core-graphics-data-types.md)

### Classes

- [CGPDFMarkedContentItem](coregraphics/cgpdfmarkedcontentitem.md)
- [CGPDFStructureElement](coregraphics/cgpdfstructureelement.md)
- [CGRenderingBufferProvider](coregraphics/cgrenderingbufferprovider.md)

### Structures

- [CGBitmapParameters](coregraphics/cgbitmapparameters-4v8wo.md)
- [CGColorModel](coregraphics/cgcolormodel.md)
- [CGContentInfo](coregraphics/cgcontentinfo.md)

### Enumerations

- [CGBitmapLayout](coregraphics/cgbitmaplayout.md)
- [CGComponent](coregraphics/cgcomponent.md)
- [CGContentToneMappingInfo](coregraphics/cgcontenttonemappinginfo-swift.enum.md)
- [CGImageComponentInfo](coregraphics/cgimagecomponentinfo.md)

## See Also

### Related Documentation

- [Quartz 2D Programming Guide](apple-archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction.md)
