把你的IMAGE拷贝一份,现在IMAGE1是隐藏的,IMAGE2是画图的,然后:
TForm1 = class(TForm)
Image1: TImage;
Timer1: TTimer; //Timer.Interval设置为200
Image2: TImage;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
FTextAng: Integer;
public
{ Public declarations }
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
W,H, X,Y,CX,CY,R: Integer;
S :String;
Rct : TRect;
begin
with Image2 do
begin
CX := Width div 2;
CY := Height div 2;
R :=20;
S := 'Hello';
W := Canvas.TextWidth(S);
H := Canvas.TextHeight(S);
X := CX+Round(Cos(FTextAng*PI/180)*R);
Y := CY+Round(Sin(FTextAng*PI/180)*R);
Rct := Rect(X,Y,X+W,Y+H);
Canvas.CopyRect(Rct,Image1.Canvas,Rct);//重画背景,从IMAGE1中COPY
FTextAng := FTextAng+10;
X := CX+Round(Cos(FTextAng*PI/180)*R);
Y := CY+Round(Sin(FTextAng*PI/180)*R);
Canvas.TextOut(X,Y,S);
end;
end;
可能比较闪烁,那就把Image2.Stretch 设为TRUE吧(难看?再把AUTOSIZE设置为TRUE)。