An NSCachedImageRep object store image data in a form that can be readily transferred to the screen. An NSCachedImageRep object differs from other image representation objects in that it simply stores the already rendered image, whereas other image representation objects generally have knowledge about how to render the image from source data.


You typically do not use this class directly. Instead, NSImage and its other image representation objects create instances of NSCachedImageRep as needed to cache versions of the rendered image. This caching speeds up screen-based drawing for existing images during subsequent rendering operations. Cached image representations are also used to capture drawing commands for images created programmatically by locking focus on an image.


Initializing an NSCachedImageRep

- initWithSize:depth:separate:alpha:

Returns an NSCachedImageRep object initialized with the specified image characteristics.

- initWithWindow:rect:

Returns an NSCachedImageRep object initialized for drawing in the specified window.

Getting the Representation

- rect

Returns the rectangle where the receiver is cached.

- window

Returns the window where the receiver is cached.


Inherits From