Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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
Feedback: 0 Comments on this Section