Another_eYes大虾,我这样不对,不知道怎么写,指教[
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
]
procedure TForm1.Button1Click(Sender: TObject);
var
Bmp :TBitmap;
FRgn :HRGN;
Ps : array[0..4] of TPoint;
begin
Bmp :=TBitmap.Create;
Ps[0] := Point(20,50);
Ps[1] := Point(100, 100);
Ps[2] :=Point(100, 200);
ps[3] := Point(200, 200);
ps[4] := Point(200, 100);
Bmp.PixelFormat :=Image1.Picture.Bitmap.PixelFormat;
Bmp.Width :=100;
Bmp.Height :=100;
BitBlt(Bmp.Canvas.Handle,0,0,Bmp.Width,Bmp.Height,Image1.Picture.Bitmap.Canvas.Handle,80,80,SRCCOPY); //要拷贝的位图
FRgn := CreatePolygonRgn(ps, 5, WINDING );
OffsetRgn(FRgn, Image1.Left, Image1.Top);
SelectClipRgn(Image1.Picture.Bitmap.Canvas.Handle,FRgn);
Image1.Picture.Bitmap.Canvas.Draw(0,0,bmp);
Image2.Picture.Assign(bmp);
Bmp.Free;
DeleteObject(FRgn);
end;