I wrote one and it works for me..
Code:
var C, Debug: TCanvas;
var T, Load, Load2: Integer;
begin
Load:= OpenFile(AppPath + 'V2.bmp', true);
Load2:= OpenFile(AppPath + 'V.bmp', true);
ClearDebug;
if (Load > -1) or (Load2 = -1) then
begin
if (Load > -1) then
begin
Writeln('Please Delete V2.bmp To Continue.');
Writeln('Found: ' + AppPath + 'V2.bmp');
Writeln(' ');
end;
if (Load2 = -1) then
begin
Writeln('Please Create V.bmp To Continue.');
Writeln(' ');
end;
TerminateScript;
end;
T:= LoadBitmap(AppPath + 'V.bmp');
C:= GetBitmapCanvas(T);
C.Rectangle(5, 5, 300, 300);
SaveBitmap(T, Apppath + 'V2.bmp');
DisplayDebugImgWindow(305, 305);
Debug:= GetDebugCanvas;
CopyCanvas(C, Debug, 0, 0, 305, 305, 0, 0, 305, 305);
end.
;\