<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVVideoCompositionLayerInstruction/getCropRectangleRamp(for:startCropRectangle:endCropRectangle:timeRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVVideoCompositionLayerInstruction(im)getCropRectangleRampForTime:startCropRectangle:endCropRectangle:timeRange:"
  },
  "title" : "getCropRectangleRamp(for:startCropRectangle:endCropRectangle:timeRange:)"
}
-->

# getCropRectangleRamp(for:startCropRectangle:endCropRectangle:timeRange:)

Obtains the crop rectangle ramp that includes the specified time.

```
func getCropRectangleRamp(for time: CMTime, startCropRectangle: UnsafeMutablePointer<CGRect>?, endCropRectangle: UnsafeMutablePointer<CGRect>?, timeRange: UnsafeMutablePointer<CMTimeRange>?) -> Bool
```

## Parameters

`time`

If a ramp with a time range that contains the specified time has been set, information about the effective ramp for that time is supplied. Otherwise, information about the first ramp that starts after the specified time is supplied.

`startCropRectangle`

A pointer to a `CGRect` to receive the starting crop rectangle value for the crop rectangle ramp.

    May be NULL.

`endCropRectangle`

A pointer to a `CGRect` to receive the ending crop rectangle value for the crop rectangle ramp.

    This value may be     `NULL`    .

`timeRange`

A pointer to a `CMTimeRange` to receive the time range of the crop rectangle ramp.

    This value may be     `NULL`    .

## Return Value

<doc://com.apple.documentation/documentation/Swift/false> will be returned if the specified time is beyond the duration of the last crop rectangle ramp that has been set.

## Discussion

---

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)