Instance Method

setOpacityRampFromStartOpacity:toEndOpacity:timeRange:

Sets an opacity ramp to apply during a specified time range.

Declaration

- (void)setOpacityRampFromStartOpacity:(float)startOpacity toEndOpacity:(float)endOpacity timeRange:(CMTimeRange)timeRange;

Parameters

startOpacity

The opacity to be applied at the start time of timeRange. The value must be between 0.0 and 1.0.

endOpacity

The opacity to be applied at the end time of timeRange. The value must be between 0.0 and 1.0.

timeRange

The time range over which the value of the opacity is interpolated between startOpacity and endOpacity.

Discussion

During an opacity ramp, opacity is computed using a linear interpolation. Before the first time for which an opacity is set, the opacity is held constant at 1.0; after the last specified time, the opacity is held constant at the last value.

See Also

Managing Properties

- setOpacity:atTime:

Sets the opacity value at a specific time within the time range of the instruction.

- setTransform:atTime:

Sets the transform value at a time within the time range of the instruction.

- setTransformRampFromStartTransform:toEndTransform:timeRange:

Sets a transform ramp to apply during a given time range.