NSQuickDrawView Class
The NSQuickDrawView class is an NSView subclass designed to make it easy to use QuickDraw from within Cocoa. Just like any other view subclass, custom drawing code should be put in the -drawRect: method implementation. The big difference is that QuickDraw drawing commands, such as PaintRect(), FrameOval(), and so on can all be used instead of Quartz calls.
NOTE
It is beyond this book’s scope to discuss the QuickDraw API. Refer to Chapters 11 and 12 of Carbon Programming by K.J. Bricknell, Sams Publishing, ISBN 0-672-32267-6 for a discussion of QuickDraw.
During the time that a QuickDraw view is focused, the -qdPort method returns a QuickDraw GrafPtr. A view is always focused before the Application Kit calls -drawRect:
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.