Animação com figuras
Aprenda a simular movimentos com o Kylix usando a Unit "Qt"
Descrição
Aprenda a simular movimentos com o Kylix usando a Unit "Qt"
unit U_Principal;
interface
uses
SysUtils, Classes, QGraphics, QForms, Qt, QMenus, QTypes;
type
TForm1 = class(TForm)
procedure FormPaint(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.xfm}
procedure TForm1.FormPaint(Sender: TObject);
var
Bmp: TBitmap;
Img: SmallInt;
begin
Bmp := TBitmap.Create;
for Img := 1 to 10 do
begin
Bmp.LoadFromFile(IntToStr(Img) + '.bmp');
Bmp.Mask(clWhite);
QWidget_setMask(Handle, QPixmap_mask(Bmp.Handle));
Canvas.Draw(0, 0, Bmp);
Sleep(400);
end;
Bmp.Destroy;
end;
end.
Essa sua iniciativa foi muito boa, acredito que teremos muitas idéias para trocar...