Developer Documentation
PATH  Mac OS X Documentation > Application Kit Reference: Java

Table of Contents

NSCachedImageRep


Inherits from:
NSImageRep : NSObject
Package:
com.apple.yellow.application


Class Description


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

See "Caching Representations" (page 680) in the NSImage class description for more information.




Method Types


Constructors
NSCachedImageRep
Getting the representation
rect
window


Constructors



NSCachedImageRep

public NSCachedImageRep()

Description forthcoming.

public NSCachedImageRep( NSWindow aWindow, 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.

You must draw the image in the rectangle yourself; there are no NSCachedImageRep methods for this purpose.

See Also: size (NSImageRep)

public NSCachedImageRep( NSSize size, int depth, boolean flag, boolean 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)




Instance Methods



rect

public NSRect rect()

Returns the rectangle where the image is cached.

See Also: size (NSImageRep)



window

public NSWindow window()

Returns the window where the image is cached.


Table of Contents