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


[Previous] [Class List] [Next]

NSCustomImageRep


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


Class Description


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 attributes of the NSCustomImageRep:

Note that if these attributes aren't set, and an NSCustomImageRep is used in an NSImage with other representations, NSImage won't be able to select among them. In practice, this usually isn't a problem.


Method Types


Initializing a new NSCustomImageRep
initWithDrawSelector:delegate:
Identifying the object
delegate
drawSelector

Constructors


NSCustomImageRep

public NSCustomImageRep()

public NSCustomImageRep(NSSelector aNSSelector, java.lang.Object anObject)



Instance Methods



delegate

public java.lang.Object delegate()

Returns the delegate object that renders the image for the NSCustomImageRep.

drawMethod

public NSSelector drawMethod()




[Previous] [Next]