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

# destinationImageRect(_:sourceImages:destinationImage:pluginState:at:)

Calculates the bounds of the output image determined by the various inputs and plug-in state at the given render time.

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

## Parameters

`destinationImageRect`

The bounds of the output image. Your plug-in should calculate this value.

`sourceImages`

An array of images that represent the input images. They will have proper bounding rectangles and pixel transforms, but no pixel data will be given yet.

`destinationImage`

`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 when the plug-in wants to calculate the output bounds of your plug-in when rendering at a particular time. It will pass in an array of images, the plug-in state returned from your plug-in’s [`pluginState(_:at:quality:)`](/documentation/professional_video_applications/FxTileableEffect/pluginState(_:at:quality:)) method, and the render time. If your plug-in is unable to calculate the output rectangle at the given time, it should return `NO` and fill out the `outError` parameter with an `NSError` that uses the [`FxPlugErrorDomain`](/documentation/professional_video_applications/FxPlugErrorDomain) and appropriate (possibly custom) error code.

---

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)