Instance Method


Sets a crop rectangle ramp to apply during the specified time range.


func setCropRectangleRamp(fromStartCropRectangle startCropRectangle: CGRect, toEndCropRectangle endCropRectangle: CGRect, timeRange: CMTimeRange)



The crop rectangle to be applied at the starting time of the timeRange.


The crop rectangle to be applied at the end time of the timeRange.


The time range over which the value of the opacity is interpolated between startCropRectangle and endCropRectangle.


The origin of the crop rectangle is the top-left corner of the buffer clean aperture rectangle. The crop rectangle is defined in square pixel space, that is, without taking the pixel aspect ratio into account. Crop rectangles extending outside of the clean aperture, are cropped to the clean aperture.

During a crop rectangle ramp, the rectangle is interpolated between the values set at the ramp's start time and end time. When the starting or ending rectangle is empty, interpolations take into account the origin and size of the empty rectangle.

Before the first specified time for which a crop rectangle is set, the crop rectangle is held constant to infinite and after the last time for which a crop rectangle is set, the crop rectangle is held constant at that last value.

See Also

Setting Crop Rectangle Values

func setCropRectangle(CGRect, at: CMTime)

Sets the crop rectangle value at a time within the time range of the instruction.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software