Inherits From:
NSImageRep : NSObject
Conforms To:
NSCoding (from NSImageRep)
NSCopying (from NSImageRep)
NSObject (from NSObject)
Declared In:
AppKit/NSImageRep.h
See "Caching Representations" in the NSImage class description for more information.
initWithSize:
(NSSize)size depth:
(NSWindowDepth)depth separate:
(BOOL)flag alpha:
(BOOL)alpha
Initializes a new NSCachedImageRep for an image of the specified size and depth. flag indicates whether the image will get its own unique cache, instead of possibly sharing one with other images. For best performance (although it's not essential), alpha should be set according to whether the image will have a channel for transparency information.
See also:
- setAlpha:
(NSImageRep), - setBitsPerSample:
(NSImageRep),
- setCacheDepthMatchesImageDepth:
(NSImage), - setCachedSeparately:
(NSImage)
initWithWindow:
(NSWindow *)aWindow rect:
(NSRect)aRect
Initializes the receiver, a new NSCachedImageRep instance, for an image that will be rendered within the aRect rectangle in the window aWindow, and returns the initialized object. The rectangle is specified in aWindow's base coordinate system. The size of the image is set from the size of the rectangle. The window is retained.
You must draw the image in the rectangle yourself; there are no NSCachedImageRep methods for this purpose.
See also:
- size
(NSImageRep)
rect
Returns the rectangle where the image is cached.
See also:
- size
(NSImageRep)
window
Returns the window where the image is cached.