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 ...

Get Programming with Quartz now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.