FMX.Ani.TAnimation.NormalizedTime

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property NormalizedTime: Single read GetNormalizedTime;

C++

__property float NormalizedTime = {read=GetNormalizedTime};

Properties

Type Visibility Source Unit Parent
property public
FMX.Ani.pas
FMX.Ani.hpp
FMX.Ani TAnimation

Description

Returns the percentage of the completion of the animation.

Given the current time, NormalizedTime returns a number in the range from 0 through 1, indicating how far the controlled property value has changed from the StartValue to the StopValue. For an Interpolation of Linear, NormalizedTime is calculated like this:

 CurrentTime/Duration

NormalizedTime gets much more complicated for the other Interpolation settings.

Using NormalizedTime, the current value for any Interpolation can then be calculated like this:

 Result := Start + (Stop - Start) * NormalizedTime;

This is the calculation done for float animation or color animation, although color values are not linear.

See Also