Mac Developer Library

Developer

AppKit Framework Reference NSCachedImageRep Class Reference

Options
Deployment Target:

On This Page
Language:

NSCachedImageRep

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. More...

Inheritance


Import Statement


Not Applicable @import AppKit;

Availability


Available in OS X v10.0 and later.
Deprecated in OS X v10.6.
  • Returns an NSCachedImageRep object initialized with the specified image characteristics.

    Declaration

    Objective-C

    - (id)initWithSize:(NSSize)size depth:(NSWindowDepth)depth separate:(BOOL)flag alpha:(BOOL)alpha

    Parameters

    size

    The size of the image, measured in points.

    depth

    The bit depth of the image. Specify 0 if you want the image to be the same depth as the deepest screen on the current system.

    flag

    YEStrue if the receiver should use a separate offscreen window to store the image; otherwise, NOfalse if the receiver should use a shared window.

    alpha

    YEStrue if the image includes transparency information; otherwise, NOfalse.

    Return Value

    The initialized NSCachedImageRep object or nil if the object could not be initialized.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.6.

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

    Declaration

    Objective-C

    - (id)initWithWindow:(NSWindow *)aWindow rect:(NSRect)aRect

    Parameters

    aWindow

    The window (typically offscreen) in which the image is to be rendered. The window is retained by the receiver.

    aRect

    The position and size of the image in the specified window. This rectangle should be specified in the base coordinate system of the window.

    Discussion

    You must draw the image yourself in the designated part of the window. There are no NSCachedImageRep methods for this purpose.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.6.

    See Also

    – size (NSImageRep)

  • rect rect (OS X v10.6)

    Returns the rectangle where the receiver is cached.

    Declaration

    Objective-C

    - (NSRect)rect

    Return Value

    The rectangle in the associated offscreen window where the receiver's image is located.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.6.

    See Also

    – size (NSImageRep)

  • window window (OS X v10.6)

    Returns the window where the receiver is cached.

    Declaration

    Objective-C

    - (NSWindow *)window

    Return Value

    The window (typically offscreen) used to store the image.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

    Deprecated in OS X v10.6.