Igor UL7AAjr
asked on
TCanvas to TBitmap.
I have a TBitmap and need to copy portion of TCanvas to it.
Something like this:
procedure CopyCanvas(aBitmap : TBitmap; aCanvas : TCanvas; aRect : TRect);
begin
// implementation wanted.
end;
PS: I can do it pixel by pixel, but it's incredible slow. There may be BitBlt function?
Something like this:
procedure CopyCanvas(aBitmap : TBitmap; aCanvas : TCanvas; aRect : TRect);
begin
// implementation wanted.
end;
PS: I can do it pixel by pixel, but it's incredible slow. There may be BitBlt function?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanx all, faster method, faster answer!
Yup, you are welcome :-)
Ciao, Mike
Ciao, Mike
This copies the section specified in aRect into exactly the same position on the destination (aBitmap in this case). If you want to copy it to another position then you'll need to modify your parameter list and the CopyRect call:
procedure CopyCanvas(aBitmap : TBitmap; aCanvas : TCanvas; srcRect, destRect : TRect);
BEGIN
aBitmap.Canvas.CopyRect(de
END;
The Neil