Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSCustomImageRep 

Inherits From:	NSImageRep : NSObject

Conforms To:	NSCoding, NSCopying (NSImageRep)
NSObject (NSObject)

Declared In:	AppKit/NSCustomImageRep.h 

An NSCustomImageRep is an object that uses a delegated method to render an image. When called upon to produce the image, it sends a message to its delegate to have the method performed.

Like most other kinds of NSImageReps, an NSCustomImageRep is generally used indirectly, through an NSImage object. An NSImage must be able to choose between various representations of a given image. It also needs to provide an off-screen cache of the appropriate depth for any image it uses. It determines this information by querying its NSImageReps.

Thus to work with an NSImage, an NSCustomImageRep must be able to provide some information about its image. Use the following methods, inherited from the NSImageRep class, to set these attributes of the NSCustomImageRep:

setSize:
setColorSpaceName:
setAlpha:
setPixelsHigh:
setPixelsWide:
setBitsPerSample:

Initializing a New NSCustomImageRep 

- (id)initWithDrawSelector:(SEL)aSelector	Initializes a new instance so that it delegates the 
delegate:(id)anObject		responsibility for drawing to anObject. When the NSCustomImageRep receives a draw message, it sends an aSelector message to anObject.

Identifying the Object 

- (id)delegate	Returns the delegate.

- (SEL)drawSelector	Returns the associated draw method selector.