abcfantasy
Programmer
Hello, I'm having a problem with bitmaps when passed as parameters. I've got the following procedure in a unit:
Then in my main program, I've got a TImage component (named image_Map) and I've got the following code:
However the result is that image_Map remains blank and nothing is displayed. Am I missing something?
Thank you in advance
Andrew
ABC -
Code:
procedure TMap.CopyArea( pImage: TBitmap; X, Y: integer );
var SourceRect, DestRect: TRect;
Map_Image: TBitmap;
begin
{some code}
pImage.Canvas.CopyRect( DestRect, Map_Image.Canvas, SourceRect );
end;
Then in my main program, I've got a TImage component (named image_Map) and I've got the following code:
Code:
procedure Tform_Main.FormCreate(Sender: TObject);
begin
Map := TMap.Create;
Map.CopyArea( image_Map.Picture.Bitmap, 50, 50 );
end;
However the result is that image_Map remains blank and nothing is displayed. Am I missing something?
Thank you in advance
Andrew
ABC -