FMX.Ani.TBitmapListAnimation.AnimationBitmap

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AnimationBitmap: TBitmap read FAnimationBitmap write SetAnimationBitmap;

C++

__property Fmx::Graphics::TBitmap* AnimationBitmap = {read=FAnimationBitmap, write=SetAnimationBitmap};

Properties

Type Visibility Source Unit Parent
property published
FMX.Ani.pas
FMX.Ani.hpp
FMX.Ani TBitmapListAnimation

Description

Specifies the image that is to be animated. AnimationBitmap can be any common image type (such as .bmp, .gif, .jpg, or .png).

The AnimationBitmap property specifies a bitmap image that is to be animated in n different cells or frames (AnimationCount), which are arranged in n rows (AnimationRowCount). The frames of the image are displayed in succession using n seconds as the Duration of the entire animation, and n seconds as the Delay before starting the animation.

To assign an image at design time, select the TBitmapListAnimation in the Object Inspector, click the ellipsis button [...] in the AnimationBitmap field, and select Edit.... The Bitmap Editor is displayed, enabling you to load, resize, and crop images.

Examples

  • The following image could be divided into four distinct frames:
Arrows 4state.png
To use this image as an AnimationBitmap, you would set the AnimationCount to 4, and the AnimationRowCount to 1. If you set the Duration to 1 second or less, you can see the arrow spin fairly quickly when you run the application.
Sprint.png
To animate the running man, set AnimationCount to 30 and AnimationRowCount to 5.
Note: The quotient of AnimationCount/AnimationRowCount must be a whole number. For example, if AnimationCount = 30 and AnimationRowCount = 4, the quotient is 7.5, and the animation does not work as expected.

See Also