Quartz 2D Programming Guide
PDF
Introduction
Overview of Quartz 2D
The Page
Drawing Destinations: The Graphics Context
Quartz 2D Opaque Data Types
Graphics States
Quartz 2D Coordinates
Memory Management: Object Ownership
Quartz Performance: A Look Under the Hood
Graphics Contexts
Creating a Window Graphics Context
Creating a PDF Graphics Context
Creating a Bitmap Graphics Context
Obtaining a Graphics Context for Printing
Paths
Path Creation and Path Painting
The Building Blocks
Creating a Path
Painting a Path
Clipping to a Path
Color and Color Spaces
About Color and Color Spaces
The Alpha Value
Creating Color Spaces
Setting and Creating Colors
Setting Rendering Intent
Transforms
About Quartz Transformation Functions
Modifying the Current Transformation Matrix
Creating Affine Transforms
Evaluating Affine Transforms
Getting the User to Device Space Transform
The Math Behind the Matrices
Patterns
The Anatomy of a Pattern
Colored Patterns and Stencil (Uncolored) Patterns
Tiling
How Patterns Work
Painting Colored Patterns
Painting Stencil Patterns
Shadows
How Shadows Work
Painting With Shadows
Gradients
Axial and Radial Gradient Examples
A Comparison of CGShading and CGGradient Objects
Extending Color Beyond the End of a Gradient
Using a CGGradient Object
Using a CGShading Object
See Also
Transparency Layers
How Transparency Layers Work
Painting to a Transparency Layer
Data Management
Moving Data Into Quartz 2D
Moving Data Out Of Quartz 2D
Moving Data Between Quartz 2D and Core Image
Bitmap Images and Image Masks
About Bitmap Images and Image Masks
Bitmap Image Information
Creating Images
Creating an Image Mask
Masking Images
Using Blend Modes With Images
CGLayer Drawing
How CGLayer Drawing Works
Drawing With a CGLayer
Example: Using Multiple CGLayer objects to Draw a Flag
PDF Document Creation, Viewing, and Transforming
Opening and Viewing a PDF
Creating a Transform for a PDF Page
Creating a PDF File
Adding Links
Protecting PDF Content
PDF Document Parsing
Inspecting PDF Document Structure
Parsing PDF Content
PostScript Conversion
Writing Callbacks
Filling a Callbacks Structure
Creating a PostScript Converter Object
Creating Data Provider and Data Consumer Objects
Performing the Conversion
Python Bindings for Quartz 2D
Text
How Quartz 2D Draws Text
Controlling How Text Looks
Drawing Text
Measuring Text Before Drawing
Copying Font Variations
PostScript Fonts
See Also
Revision History
Glossary