<!--
{
  "availability" : [
    "FxPlug: 4.0.0 -",
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "professional_video_applications",
  "identifier" : "/documentation/professional_video_applications/FxTileableEffect/sourceTileRect(_:sourceImageIndex:sourceImages:destinationTileRect:destinationImage:pluginState:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Professional Video Applications"
    ],
    "preciseIdentifier" : "c:objc(pl)FxTileableEffect(im)sourceTileRect:sourceImageIndex:sourceImages:destinationTileRect:destinationImage:pluginState:atTime:error:"
  },
  "title" : "sourceTileRect(_:sourceImageIndex:sourceImages:destinationTileRect:destinationImage:pluginState:at:)"
}
-->

# sourceTileRect(_:sourceImageIndex:sourceImages:destinationTileRect:destinationImage:pluginState:at:)

Calculate the input rectangle needed for the given image input and the output tile to be rendered.

```
func sourceTileRect(_ sourceTileRect: UnsafeMutablePointer<FxRect>, sourceImageIndex: Int, sourceImages: [FxImageTile], destinationTileRect: FxRect, destinationImage: FxImageTile, pluginState: Data?, at renderTime: CMTime) throws
```

## Parameters

`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 `inputImages` array below.

`sourceImages`

An `NSArray` of 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:)`](/documentation/professional_video_applications/FxTileableEffect/pluginState(_:at:quality:)) method.

`renderTime`

The rational time at which the output will be rendered.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)