Code: Select all
procedure TForm1.RVCamera1GetImage(Sender: TObject; img: TRVMBitmap);
var
bmp: TBitmap;
S: String;
Sz: TSize; //Types
DANWEIMC: string;
begin
if CheckBox_shijiancuo.Checked then
begin
bmp := img.GetBitmap;
with bmp.Canvas do
begin
Lock;
try
DANWEIMC := 'XXX';
Brush.Style := bsClear;
Font.PixelsPerInch := 96;
Font.Name := 'Tahoma';
// Font.Color := clRed;
Font.Color := clWhite;
Font.Size := 12;
// S := TimeToStr(Now); //DateTimeToStr
S := DANWEIMC + ' ' + DateTimeToStr(Now);
// DateTimeToStr\DateTimeToString
Sz := TextExtent(S);
TextOut(bmp.Width - Sz.cx - 2, bmp.Height - Sz.cy - 2, S);
finally
Unlock;
end;
end;
img.UpdateData;
end;
end;