p;
begin
x:=x-1;
tt:=tt-1;
ifx<-160then
x:=image1.height+20;
tt:=x+80;
image1.Canvas.font.size:=18;
image1.Canvas.font.color:=$1200ffff;
image1.Canvas.TextOut(10,x,''OK字幕移动演示'');
image1.Canvas.font.size:=12;
image1.Canvas.font.color:=$120000ff;
image1.Canvas.TextOut(20,x+50,''字体变色效果演示'');
l:=image1.Canvas.textwidth(''字体变色效果演示'');
h:=image1.Canvas.textheight(''字体变色效果演示'');
image1.Canvas.pen.color:=clGreen;
image1.Canvas.moveto(20,h+x+50-2);
image1.Canvas.lineto(20+l,h+x+50-2);
pic.topleft.x:=30;
pic.topleft.y:=tt;
pic.bottomright.x:=pic.topleft.x+100;
pic.bottomright.y:=pic.topleft.y+80;
image1.canvas.stretchdraw(pic,map);
image1.Canvas.pen.color:=clGreen;
image1.Canvas.moveto(0,pic.topleft.y+80);
image1.Canvas.lineto(pic.topleft.x+100,pic.topleft.y+80)
;
end;
{以下设置动画初值}
procedure TForm1.FormCreate(Sender:TObject);
begin
timer1.enabled:=true;
timer1.Interval:=10;
x:=image1.height+20;
tt:=x+80;
form1.repaint;
image1.Canvas.brush.color:=clGreen;
pic:=Rect(0,0,image1.width,image1.height);
image1.Canvas.FillRect(pic);
pic:=Rect(-1,-1,1,1);
map:=Tbitmap.create;
map.loadfromfile(''d:\windows\256color.bmp'');
image1.canvas.stretchdraw(pic,map);
end;