Summary

This chapter introduced the techniques used to draw paths with a variety of attributes and styles. Custom drawing is implemented by subclassing the NSView class. A variety of Cocoa classes exist to aid the implementation of view subclasses. The NSBezierPath class is used to define paths that are stroked or filled. The built-in 2D graphics capabilities provided by Quartz and accessible using Cocoa rival those of expensive graphics applications. Complex and powerful graphics can be produced with the techniques described, but this chapter has only scratched the surface of Cocoa capabilities. Chapter 13 and Chapter 14 expand on the information already presented. The next chapter introduces more classes that enable drawing and delves into ...

Get Cocoa® Programming 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.