Hey.
How do i get a bitmap that is at a ceratin location during runtime ?
~caused
Hey.
How do i get a bitmap that is at a ceratin location during runtime ?
~caused
I had no idea on how to do it with copycanvas :'D.
Anyone knows the trick ?.
(Gotta read a bit about canvases anyway)
Well I would make a data type for Dest:TCanvas. Then I would get that location using the sx, sy parameters. I would then call it in run time by doing:
SCAR Code:SafeCopyCanvas(GetClientCanvas, OurCanvas, parameters);
Bitmap := 'blah here'
If FindBitmap(Bitmap, x, y) Then //then call it
If you need more help, then add me on MSN
Last edited by Naum; 09-19-2012 at 11:34 AM.
Yeah, i still dont get it.
Could you write an example procedure ?.
Basicly i dont understand where to copy the canvas to. Cause i want a bitmap as result :x..
//added you btw
~caused
SCAR Code:function ExtractClientBitmap(area: TBox): integer;
var
dx, dy: integer;
begin
dx := area.x2 - area.x1; //Figure out our dimensions
dy := area.y2 - area.y1;
result := BitmapFromString(dx, dy, ''); //Create a blank bitmap
try
CopyClientToBitmap(result, area.x1, area.y1, area.x2, area.y2); //Copy desired area into bitmap
except
FreeBitmap(result); //If anything goes wrong, free the bitmap
writeln('ExtractClientBitmap failed.');
end;
end;
That should help![]()
Interested in C# and Electrical Engineering? This might interest you.
Fantastic : D I got it now. thanks!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)