newbmp.Width:=image1.Width;
newbmp.Height:=image1.Height;
bmpheight:=image1.Height;
bmpwidth:=image1.Width;
i:=0;
while i<=bmpheight do
begin
j:=i;
while j>0 do
begin
newbmp.Canvas.CopyRect(Rect(0,j -1,bmpwidth,j),
image1.Canvas,Rect(0,bmpheight -i +j -1,bmpwidth,bmpheight -i +j));
newbmp.Canvas.CopyRect(Rect(0,bmpheight -j,
bmpwidth,bmpheight -j +1),image1.Canvas,Rect(0,i -j,bmpwidth,i -j +1));
j:=j -2;
end;
form1.Canvas.Draw(120,100,newbmp);
i:=i +2;
end;
newbmp.free;
end;
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/