怎样实现以特效显示图像? ⑤
由两边向中间逼近……………………
=======================
代码……让你疯狂
=======================
问题点数:100、回复次数:2Top
1 楼Cbfan(民族英雄~~)回复于 2002-04-12 16:48:41 得分 50
别忘了给分,呵呵~~
引文一篇:
继续!
6、在Items4的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item4Click(TObject *Sender)
{ //图像从上下往中间合进//
Form1->Refresh( );
HeightHalf=Bitmap1->Height/2+Bitmap1->Height%2;
for(i=0;i<=HeightHalf;i++)
{
Dest1=Rect(0,0,Bitmap1->Width,i);
Source1=Rect(0,HeightHalf-i,Bitmap1->Width,HeightHalf);
Dest2=Rect(0,Bitmap1->Height-i,
Bitmap1->Width,Bitmap1->Height);
Source2=Rect(0,HeightHalf,Bitmap1->Width,HeightHalf+i);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
Form1->Canvas->CopyRect(Dest2,Bitmap1->Canvas,Source2);
for(j=0;j<10000;j++);
}
}
7、在Items5的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item5Click(TObject *Sender)
{ //图像从左移入//
Form1->Refresh( );
for(i=Bitmap1->Width;i>=0;i--)
{
Dest1=Rect(0,0,Bitmap1->Width-i,Bitmap1->Height);
Source1=Rect(i,0,Bitmap1->Width,Bitmap1->Height);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
8、在Items6的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item6Click(TObject *Sender)
{ //图像从右移入//
Form1->Refresh( );
for(i=0;i<=Bitmap1->Width;i++)
{
Dest1=Rect(Bitmap1->Width-i,0,Bitmap1->Width,
Bitmap1->Height);
Source1=Rect(0,0,i,Bitmap1->Height);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
9、在Items7的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item7Click(TObject *Sender)
{ //图像从上移入//
Form1->Refresh( );
for(i=0;i<=Bitmap1->Height;i++)
{
Dest1 =Rect(0,0,Bitmap1->Width,i);
Source1 =Rect(0,Bitmap1->Height-i,Bitmap1->Width,Bitmap1->Height);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}Top
2 楼Cbfan(民族英雄~~)回复于 2002-04-12 16:49:44 得分 50
别忘了给分,呵呵~~
引文一篇:
继续!
10、在Items8的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item8Click(TObject *Sender)
{ //图像从下移入//
Form1->Refresh( );
for(i=0;i<=Bitmap1->Height;i++)
{
Dest1 =Rect(0,Bitmap1->Height-i,Bitmap1->Width,
Bitmap1->Height);
Source1 =Rect(0,0,Bitmap1->Width,i);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
11、在Items9的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item9Click(TObject *Sender)
{ //图像从左刷屏显示//
Form1->Refresh( );
for(i=0;i<=Bitmap1->Width;i++)
{
Dest1 =Rect(0,0,i,Bitmap1->Height);
Source1 =Rect(0,0,i,Bitmap1->Height);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
12、在Items10的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item10Click(TObject *Sender)
{ //图像从右刷屏显示//
Form1->Refresh( );
for(i=Bitmap1->Width;i>=0;i--)
{
Dest1 =Rect(i+0,0,0+Bitmap1->Width,0+Bitmap1->Height);
Source1 =Rect(i,0,Bitmap1->Width,Bitmap1->Height);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
13、在Items11的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item11Click(TObject *Sender)
{ //图像从上刷屏显示//
Form1->Refresh( );
for(i=0;i<=Bitmap1->Height;i++)
{
Dest1 =Rect(0,0,Bitmap1->Width+0,i+0);
Source1 =Rect(0,0,Bitmap1->Width,i);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
14、在Items12的OnClieck事件中添加如下代码:
void__fastcall TForm1::Item12Click(TObject *Sender)
{ //图像从下刷屏显示//
Form1->Refresh( );
for(i=Bitmap1->Height;i>=0;i--)
{
Dest1 =Rect(0,i+0,Bitmap1->Width+0,Bitmap1->Height+0);
Source1 =Rect(0,i,Bitmap1->Width,Bitmap1->Height);
Form1->Canvas->CopyRect(Dest1,Bitmap1->Canvas,Source1);
for(j=0;j<10000;j++);
}
}
Top




