sourceTileRect(_:sourceImageIndex:sourceImages:destinationTileRect:destinationImage:pluginState:at:)
Calculate the input rectangle needed for the given image input and the output tile to be rendered.
Declaration
func sourceTileRect(_ sourceTileRect: UnsafeMutablePointer<FxRect>, sourceImageIndex: Int, sourceImages: [FxImageTile], destinationTileRect: FxRect, destinationImage: FxImageTile, pluginState: Data?, at renderTime: CMTime) throwsParameters
- sourceTileRect:
The bounds of input tile for this input that will be needed to render the output tile. This method must calculate this value.
- sourceImageIndex:
The index of the input image for which the tile bounds have been requested. This index matches the order of images in the
inputImagesarray below. - sourceImages:
An
NSArrayof image tiles representing the input images. This image will not yet contain any pixel data, just the image bounds, pixel transforms, and other data describing the image. - destinationTileRect:
The bounds of the output tile, given to you by the host application.
- destinationImage:
The output image. This image will not yet contain any pixel data, just the image bounds and other data about the output image.
- pluginState:
The NSData returned from your plug-in’s Pluginstate(_:at:quality:) method.
- renderTime:
The rational time at which the output will be rendered.
Mentioned in
Discussion
This method is called for each image input your plug-in has requested. Use the passed-in information to calculate the portion of the current input image that you’ll need to render the output tile that will be rendered next.