|
Version: 1.0 Posted: 2003-01-14 Build Requirements: N/A Runtime Requirements: Mac OS X Download Sample (QTGraphicsImport.zip, 47.0K) |
||||
DescriptionThis sample demonstrates how to use the QuickTime graphics importer to draw/manipulate an image in a Cocoa NSWindow using the NSQuickDrawView class. The NSQuickDrawView class provides a single method, -qdport, which gives us a QuickDraw graphics port for use within the NSWindow/NSView. We pass the graphics port returned by this method to QuickTime (specifically, the GraphicsImportSetGWorld function) to specify our drawing environment. Additionally, we override the drawRect method in the NSView/NSQuickDrawView class to perform all our drawing using the Graphics importer routines. The sample will initially draw the image "qtlogo.pct" contained in the application package. However, the user can set a new image by pressing the "Set Image" button. Also, the user may export the image to a different format by pressing the "Export" button. Document Revision History
|
|