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

Chapter 6: Drawing with Paths

All Quartz drawing falls into of one of three fundamental categories: line art (graphics that consist of paths that are filled, stroked, or both), sampled images, and text. Understanding how to draw with paths and the way Quartz paints them is a key part of understanding the Quartz imaging model.

Quartz paths are mathematical descriptions. A path can consist of straight-line segments and B zier curve segments both quadratic and cubic. Primitive path construction functions add these types of segments to create a path. In addition, Quartz has a number of convenience functions to add path segments for the most common shapes. Paths are constructed separately from painting them. You can fill, stroke, or fill and stroke them. There are a variety of ways to control how Quartz fills and strokes paths; the order of these operations can affect the outcome. In addition to using a path to fill or stroke a shape, paths can define a clipping (or masking) area. In Jaguar and later versions, Quartz allows reusable path objects, making it simpler and more efficient to repeatedly paint a particular shape.

This chapter describes path properties and shows how to use Quartz functions to create, stroke, and fill paths. You'll also see how to perform clipping using paths, work with path objects, and use a variety of utility functions. The chapter also provides a discussion of anti-aliasing and its effect on Quartz rendering.

Properties of Paths

A path consists of a sequence of straight-line and curved segments that are described...

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: Quartz Tube and Rod
Finish!
Privacy Policy

This is embarrasing...

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