Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When working with Core Graphics, you’ll find that everything comes down to paths, gradients, text, and images. When you draw to a graphics context, nine times out of ten you’ll be working with one of these operations. At this point you’ve probably noticed that the Core Graphics API is pretty straightforward. Once you’ve established a graphics context, drawing code can be as complex or as simple as needed.
For a complete set of code recipes demonstrating these drawing tasks, as well as examples on working with PDF documents in Core Graphics, visit iOSCoreFrameworks.com/download#chapter-6.
A path is one of the simplest forms of drawing. Remember when you were a kid and you played connect the dots? This is essentially how paths work when drawing in Core Graphics. A path is no more than a series of points that are connected using either straight lines or multiple points calculated over a Bézier curve. There are a couple of ways to work with paths in Core Graphics, but the most useful and straightforward is to use the UIBezierPath object.