Programming with Quartz: 2D and PDF Graphics in Mac OS X

Chapter 12: Creating Bits

Overview

There are two ways to capture drawing in Quartz through drawing commands or by creating bitmap raster data (or bits). A PDF representation of Quartz drawing captures drawing commands in their most abstract form. The commands execute when you view the content, which means you can choose the resolution of a PDF document at viewing time. You can change the resolution of the content as you view it and the content still appears sharp.

Bitmap image formats, in contrast, represent a pre-rendered (or rasterized) form of Quartz drawing. You set the image resolution when you create the image content. Drawing the image at the original size produces good fidelity, but if you zoom in on the image, you'll see artifacts because the clarity is limited by the image resolution.

Despite the limitations of using bits to capture drawing, there are times when bits are a better choice than PDF. Not all applications in Mac OS X support PDF data and most other computing platforms do not have the rich PDF support that Mac OS X has. However, image formats like PNG and JPEG are almost universally supported. If the drawing you want to capture might be used outside your application, you'll want to be able to export your drawing into graphics formats other than PDF.

There are other reasons for creating bits from Quartz drawing. Some applications want to capture drawing so that they can cache content that they later want to draw to the screen. In this case, capturing...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Image Processors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.