Chapter 5 The Quartz Coordinate System and Coordinate Transformations

Quartz uses a standard Cartesian coordinate system. By default, the origin is in the lower-left corner of the drawing canvas with x values increasing to the right and y values increasing upwards. Coordinates are floating-point values that represent units in a device-independent coordinate system. An application can draw to a window or a bitmap, a printer, or another output device. Quartz takes care of mapping the coordinates appropriately.

As you’ve seen in “Quartz 2D Drawing Basics” (page 15), the coordinate system can be transformed by translation, rotation, and scaling operations to achieve a variety of interesting effects with relatively little effort. Quartz also provides ...

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.