Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights
Reserved.
NSCachedImageRep
Inherits From: NSImageRep : NSObject
Conforms To: NSCoding, NSCopying (NSImageRep)
NSObject (NSObject)
Declared In: AppKit/NSCachedImageRep.h
Class Description
NSCachedImageRep, a subclass of NSImageRep, defines an object that stores its
source data as a rendered image in a window, typically a window that stays
off-screen. The only data that's available for reproducing the image is the
image itself. Thus an NSCachedImageRep differs from the other kinds of
NSImageReps defined in the Application Kit, all of which can reproduce an image
from the information originally used to draw it. Instances of this class are
generally used indirectly, through an NSImage object.
Initializing an NSCachedImageRep
- - (id)initWithSize:(NSSize)aSize Initializes a new
NSCachedImageRep for an image of the
depth:(NSWindowDepth)aDepth specified size and depth. The
separate argument
separate:(BOOL)separate specifies whether the image will get
its own unique
alpha:(BOOL)alpha cache, instead of possibly sharing one with
other images. For best performance (although it's not essential), the
alpha argument should be set according to whether the image will have a
channel for transparency information.
- - (id)initWithWindow:(NSWindow *)aWindow Initializes the new
NSCachedImageRep for an image to be
rect:(NSRect)aRect drawn in the rectangle aRect of the
specified window. This method retains aWindow.
Getting the Representation
- - (NSRect)rect Returns the rectangle where the image is cached.
- - (NSWindow *)window Returns the NSWindow where the image is cached.