代码拉取完成,页面将自动刷新
TFMXBezierAnimation component inherit from TFloatAnimation, you can just drop a TFMXBezierAnimation component same as TFloatAnimation.
use these code to set the cubic-bezier parameters
BezierAnimation1.Duration := duration;
BezierAnimation1.SetData(X1, Y1, X2, Y2);
BezierAnimation1.Start;
This is the interface of TBezier
TBezier = class
public
constructor Create(p1x, p1y, p2x, p2y: Double);
procedure SetData(p1x, p1y, p2x, p2y: Double);
function SampleCurveX(t: Double): Double;
function SampleCurveY(t: Double): Double;
function SampleCurveDerivativeX(t: Double): Double;
function SolveCurveX(x, epsilon: Double): Double;
function Solve(x, epsilon: Double): Double;
class function GetLinear: TBezier;
class function GetEase: TBezier;
class function GetEaseIn: TBezier;
class function GetEaseOut: TBezier;
class function GetEaseInOut: TBezier;
end;
there are 5 predefined bezier curves, linear, ease, ease-in, ease-out, ease-in-out, you can call corresponding class function to get the curve.
Ani := TBezier.GetEaseInOut;
BezierAnimation1.SetBezier(Ani);
or you can defined your curve
Ani := TBezier.Create(p1x, p1y, p2x, p2y);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。