Contents

QCPlugInOutputImageProvider

The QCPlugInOuputImageProvider protocol eliminates the need to use explicit image types for the image output ports on a custom patch. The methods in this protocol are called by the Quartz Composer engine when the output image is needed. If your custom patch has an image output port, you need to implement the appropriate methods for rendering image data and to supply information about the rendering destination and the image bounds.

Declaration

protocol QCPlugInOutputImageProvider

Overview

Output images are opaque provider objects that comply to this protocol. To create an image output port as an Objective-C 2.0 property, declare it as follows:

@property(dynamic) id<QCPlugInOutputImageProvider> outputImage;

To create an image input port dynamically use the type QCPortTypeImage:

[self addOutputPortWithType:QCPortTypeImage
                    forKey:@"outputImage"
            withAttributes:nil];

To write images to that port, you need to implement the methods in this protocol and create an internal class that represents the images produced by the custom patch. For example, a simple interface for an image provider is:

@interface MyOutputImage : NSObject <QCPlugInOutputImageProvider>
{
    NSUInteger _width;
    NSUInteger _height;
}

Topics

Rendering an Image to a Destination

Providing Information About the Image

Providing Information About the Rendering Destination

See Also

Protocols