procedure Tfrm_Main.VMRTextOut(AText: string); //显示字幕
var
VMRBitmap: TVMRBitmap;
begin
if AText = '' then exit;
VMRBitmap := TVMRBitmap.Create(VideoWindow1);
with VMRBitmap, Canvas do
begin
LoadEmptyBitmap(VideoWindow1.Width, VideoWindow1.Height, pf24bit, clblack);
Source := VMRBitmap.Canvas.ClipRect;
Options := VMRBitmap.Options + [vmrbSrcColorKey];
ColorKey := clblack;
Brush.Color := clblack;
Font := frm_Option.AFont;
TextOut(0, 0, AText);
DrawTo(0, 0, 1, 1, 0.5); //画的位置
end;
VMRBitmap.Free;
end;
这是一个自定义函数呀