在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在 HD 窗体上添加一个 TAniIndicator, 修改其 Enabled 属性为 True, 动画完成了. Enabled: Boolean; // Style: TAniIndicatorStyle; //TAniIndicatorStyle = (aiLinear, aiCircular); {例} AniIndicator1.Style := TAniIndicatorStyle.aiCircular;
TFloatAnimation // TFloatKeyAnimation // TColorAnimation // TColorKeyAnimation // TGradientAnimation // TPathAnimation // TRectAnimation // TBitmapAnimation // TBitmapListAnimation // TFloatKeyAnimation // TColorKeyAnimation //
StartAnimation(); // StopAnimation(); // StartTriggerAnimation(); // StartTriggerAnimationWait(); // StopTriggerAnimation(); // AnimateFloat(); // AnimateColor(); // AnimateFloatDelay(); // AnimateFloatWait(); // StopPropertyAnimation(); //
InterpolateSingle(); // InterpolateRotation(); // InterpolateColor(); // InterpolateLinear(); // InterpolateSine(); // InterpolateQuint(); // InterpolateQuart(); // InterpolateQuad(); // InterpolateExpo(); // InterpolateElastic(); // InterpolateCubic(); // InterpolateCirc(); // InterpolateBounce(); // InterpolateBack(); //
//Bitmap 属性: Create New TBitmapAnimation Create New TBitmapListAnimation //Color 属性: Create New TColorAnimation Create New TColorKeyAnimation //Gradient 属性: Create New TGradientAnimation //Width、Height、X、Y、StrokeThickness、XRadius、YRadius、Opacity、RotationAngle 等属性: Create New TFloatAnimation Create New TFloatKeyAnimation
//一般在设计时取值即可, 下面是运行时的代码: procedure TForm1.FormCreate(Sender: TObject); begin FloatAnimation1.Enabled := True; FloatAnimation1.Loop := True; FloatAnimation1.Duration := 2.5; //一个动画周期的长度(秒) FloatAnimation1.StartValue := 0; //起点角度 FloatAnimation1.StopValue := 360; //终点角度 end;
uses FMX.Objects, FMX.Ani; //添加, 但不要重复添加 var rect: TRectangle; procedure TForm1.FormCreate(Sender: TObject); begin rect := TRectangle.Create(Self); rect.Parent := Self; rect.Align := TAlignLayout.alCenter; with TFloatAnimation.Create(Self) do begin Parent := rect; PropertyName := 'RotationAngle'; Enabled := True; Loop := True; Duration := 2.5; StartValue := 0; StopValue := 360; end; end; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论