Contents

CGContext

A Quartz 2D drawing environment.

Declaration

class CGContext

Overview

A CGContext instance represents a Quartz 2D drawing destination. A graphics context contains drawing parameters and all device-specific information needed to render the paint on a page to the destination, whether the destination is a window in an application, a bitmap image, a PDF document, or a printer.

Topics

Creating Bitmap Graphics Contexts

Creating PDF Graphics Contexts

Converting Between Coordinate Spaces

Constructing a Current Graphics Path

Examining the Current Graphics Path

Drawing the Current Graphics Path

Drawing Shapes

Drawing Images and PDF Content

Drawing Gradients and Shadings

Drawing Text

Drawing Core Graphics Layers

Setting Fill, Stroke, and Shadow Colors

Working with the Current Clipping Path

Working with Transparency Layers

Working with the Current Transformation Matrix

Setting Path Drawing Options

Saving and Restoring Graphics State

Managing a Graphics Context

Managing a Bitmap Graphics Context

Managing a PDF Graphics Context

Managing a Page-Based Graphics Context

Working with Core Foundation Types

Constants

Instance Methods

Structures

Initializers

Instance Properties

See Also

Related Documentation

  • Quartz 2D Programming Guide

2D Drawing