Class

NSCustomImageRep

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.

Symbols

Initializing a New NSCustomImageRep

init(draw: Selector, delegate: Any)

Returns an NSCustomImageRep object initialized with the specified delegate information.

init(size: NSSize, flipped: Bool, drawingHandler: (NSRect) -> Bool)

Initializes an image representation of the specified size and flipped status, using a Block to draw its content.

Getting the Custom Image Drawing Handler Destination Rectangle

var drawingHandler: ((NSRect) -> Bool)?

The destination rectangle of the drawing handler Block.

Identifying the Object

var delegate: AnyObject?

the delegate object that renders the image for the receiver.

var drawSelector: Selector?

The selector for the delegate's drawing method.

Relationships

Inherits From