Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSCustomImageRep.h |
An NSCustomImageRep
object uses a delegate object to render an image. When called upon to produce an image, it sends a message to its delegate to do the actual drawing. You can use this class to support custom image formats without going to the trouble of subclassing NSImageRep
directly.
Returns the delegate object that renders the image for the receiver.
- (id)delegate
The delegate object.
NSCustomImageRep.h
Returns the selector for the delegate's drawing method.
- (SEL)drawSelector
The selector for the delegate's drawing method.
NSCustomImageRep.h
Returns an NSCustomImageRep
object initialized with the specified delegate information.
- (id)initWithDrawSelector:(SEL)aMethod delegate:(id)anObject
The selector to call when it is time to draw the image. The method should take a single parameter of type id
that represents the NSCustomImageRep
object that initiated drawing. The method must draw the image starting at the point (0, 0) in the current coordinate system.
The delegate object that responds to the selector in aMethod.
An initialized NSCustomImageRep
object, or nil
if the object could not be initialized.
When the receiver is asked to draw the image, it sends the specified message to the selector, passing itself as a parameter to the delegate method. The delegate's drawing method should have the following form:
- (void)myCustomDrawMethod:(id)anNSCustomImageRep; |
– draw
(NSImageRep)NSCustomImageRep.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-01-19)