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:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access