1,184
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.Button1Click(Sender: TObject);
var
Bmp1, Bmp2: TBitmap;
Ra, Rb : TRect;
begin
Ra := Rect(30,30,Self.Image1.Width+30,Self.Image1.Height+30);
Rb := Rect(0,0,Self.Image1.Width,Self.Image1.Height);
Bmp1 := TBitmap.Create;
Bmp2 := TBitmap.Create;
Bmp2.Height := Image1.Height;
Bmp2.Width := Image1.Width;
Bmp1.LoadFromFile('c:\a001.bmp');
Bmp2.Canvas.CopyRect(Rb, Bmp1.Canvas, Ra);
Image1.Picture.Bitmap.Assign(Bmp2);
Bmp1.Free;
Bmp2.Free;
end;