How on Earth do you create a bitmap animation in FireMonkey once you have a bitmap strip?
How on Earth do you create a bitmap animation in FireMonkey once you have a bitmap strip?
Does anybody know? I tried for 10 mins yesterday but couldn't do it - and I had to go to bed to be in work at my usual time today.
A
Does anybody know? I tried for 10 mins yesterday but couldn't do it - and I had to go to bed to be in work at my usual time today.
A
In FireMonkey, you spend years not minutes. But if you can load the whole bitmap, then you translate it (animate position) with a float animation, behind a mask, I guess?
ReplyDeleteIf you have a 320x32 bitmap in Image1 with 2 PaintBox of 32x32 you can do that
ReplyDeleteprocedure TForm1.PaintBox1Paint(Sender: TObject; Canvas: TCanvas);
begin
Canvas.DrawBitmap(Image1.Bitmap, TRectF.Create(0, 0, 32, 32), PaintBox1.LocalRect, 1);
end;
procedure TForm1.PaintBox2Paint(Sender: TObject; Canvas: TCanvas);
begin
Canvas.DrawBitmap(Image1.Bitmap, TRectF.Create(32, 0, 32 + 32, 32), PaintBox2.LocalRect, 1);
end;
Andrea Raimondi You need to use the TMediaPlayer. Sometime ago I wanted to do an animated gif but I believe the principal is the same with what you want to do. Have a look here:
ReplyDeleteplus.google.com - Is there a FireMonkey component (or way) to present GIF images? I've found a...
Place a TRectangle on a form. Set Fill.Kind to Bitmap. Click ellipsis on Bitmap.Bitmap and select Create New BitmapListAnimation. Load your image into AnimationBitmap and adjust the animation properties to your needs.
ReplyDelete