Show: Delphi C++
Display Preferences

FMX.Types.TInterpolationType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TInterpolationType = (Linear, Quadratic, Cubic, Quartic, Quintic, Sinusoidal, Exponential, Circular, Elastic, Back, Bounce);

C++

enum class DECLSPEC_DENUM TInterpolationType : unsigned int { Linear, Quadratic, Cubic, Quartic, Quintic, Sinusoidal, Exponential, Circular, Elastic, Back, Bounce };

Properties

Type Visibility Source Unit Parent
enum public
FMX.Types.pas
FMX.Types.hpp
FMX.Types FMX.Types

Description

The type of the Interpolation property of an animation.

Determines how the rate at which the current value (or StartValue) of a property is changed to the destination value (StopValue) over time. On a graph plotting the value of a property the animation is applied to (using the TAnimation PropertyName property) one endpoint is represented by the start value at t=0. The other endpoint is the stop value at t=Duration seconds. Many different paths can connect these two points. The only requirement is that time keeps moving forward! TInterpolationType provides a variety of paths to choose from.

With a TInterpolationType of Linear, the value of the property changes linearly over time, and the path between our start and stop points is a straight line. This and other values for TInterpolationType are described below.

See the AttachTAnimation (Delphi) code example referenced at the bottom for the visual demonstration.

TInterpolationType can take one of the following values:

Value Meaning

Linear

A linear interpolation. The property value this animation applies to changes constantly over time.

Quadratic

A quadratic function is applied to the path between the start and stop points. The slope of the path is zero at the start point and increases constantly over time. A scalar is applied to the function to make the endpoint fall on the path.

Cubic

The interpolation is of the form y = x**3. The slope of the path is zero at the start point and increases much faster than the quadratic function over the path.

Quartic

The interpolation is of the form y = x**4. The slope of the path is zero at the start point and increases much faster than the quadratic function over the path.

Quintic

The interpolation is of the form y = x**5. The slope of the path is zero at the start point and increases much faster than the quadratic function over the path.

Sinusoidal

The interpolation is of the form y = sin(x). The slope of the path is zero at the start point and places the first inflexion of the sin curve (x=pi) at the stop point.

Exponential

The interpolation is of the form y = e**x. The slope of the path is one at the start point and increase much faster than the quadratic function over the path.

Circular

The path between the start and stop point for this interpolation is a quarter of a circle. The slope of the path is zero at the start point and verticle at the stop point.

Elastic

The path follows a progressive sinusoidal geometric interpolation. The sinusoidal amplitude of the path can be smaller at the beginning and bigger at the end or vice-versa depending on the animation type (in / out).

Back

The path does not follow a geometric interpolation. The value (y coordinate) increases, moving back toward the Start Value, but time (x value) must always move in a positive direction.

Bounce

The path depicts a bouncing ball. The path is made up of circular curves with curvature away from the straight line that connects the start and stop points. These curves are connected by sharp points.

Several properties of the TAnimation and TFloatAnimation can effect the path specified by the interpolation. The descriptions above are for:

  • StartFromCurrent = True
  • AnimationType = atIn

Setting the AnimationType to Out causes everything said above about the start point to apply to the stop point. See documentation for these animation properties for their effect.

See Also

Code Examples

Personal tools
In Other Languages
Previous Versions
Assistance