Board index » delphi » Copy a Rect ?

Copy a Rect ?

Hello,
 I have 2 Bitmaps.. one Filled and the other is empty.
 Now the 2 bitmaps have the same height & width...
 All i want is to copy from the first bitmap to the
 second only the half bitmap (Width div 2) ...

      First Bitmap: ########## (# = data/image)
 Second Bitmap: 0000000000 (0 = empty/Black color)
 Second Bitmap
 after filling the
 half of the first  : #####00000

Any ideas ?

I Sent as example the half of the bitmap (Width div 2) but
i want to get for every position not only the half.

Thanks

 

Re:Copy a Rect ?


Quote
Gate wrote:
>  I have 2 Bitmaps.. one Filled and the other is empty.
>  Now the 2 bitmaps have the same height & width...
>  All i want is to copy from the first bitmap to the
>  second only the half bitmap (Width div 2) ...
>       First Bitmap: ########## (# = data/image)
>  Second Bitmap: 0000000000 (0 = empty/Black color)
>  Second Bitmap
>  after filling the
>  half of the first  : #####00000

   VAR Crect : TRect;

   Crect:=Rect(0,0,width DIV 2,height);
   BitMap2.Canvas.CopyRect(CRect,BitMap1.Canvas,CRect);

--
Charles Hacker
Lecturer in Electronics and Computing
School of Engineering
Griffith University - Gold Coast

Other Threads