Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 12. Image Drawing > Core Graphics

Feedback: 0 Comments on this Section

Core Graphics

Let’s start with the oldest way to draw images – Core Graphics. Core Graphics is compatible with all versions of Mac OS X. Note that CGImage is the Quartz API underneath NSImage. You will get good performance from it – especially with extremely large images. (See CGDataSupplier for details on drawing large images.) Open ImageViewCG.h and add a couple of instance variables:

#import <Cocoa/Cocoa.h>

@interface ImageViewCG : NSView {
    CGImageRef image;
    CGRect destRect;
}

@end


You are currently reading a free preview of this book.

                                                                                                         

Sign up for a
Safari Library subscription
to access Rough Cuts.

  

Subscribe Now