Code :
- var
- Bitmap: TBitmap;
- MyRect, MyOther: TRect;
- begin
- MyRect := Rect(10,10,100,100);
- MyOther := Rect(10,111,100, 201);
- Bitmap := TBitmap.Create;
- Bitmap.LoadFromFile('c:\windows\tartan.bmp' );
- Form1.Canvas.BrushCopy(MyRect, Bitmap, MyRect, clBlack);
- Form1.Canvas.CopyRect(MyOther,Bitmap.Canvas,MyRect);
- Bitmap.Free;
- end;
|