画的时候不能影响视频的播放,各位老师有没有知道的?请指点一下,先谢谢啦!来者有分!
解决方案 »
- 一些简单的问题
- 显示提示窗体
- 如何在一篇word文档中,查找某个字(或字符)出现的次数
- 算法?????????????????????
- 一个比较难的!如何在Image中用带箭头的线连接二个动态创建的Button?
- Delphi中如何用程序实现打印机的安装。
- cancelbatch的问题?急!(在线等待)
- ADOQuery数据保存
- 怎么让按钮(TButton)截获WM_LBUTTONDBLCLK消息并处理它呢?
- 如何delphi通过bde的sql link连接oracle数据库,是否要安装一个oracle客户端
- 报表 (QReport控件) 中显示图片问题 用QRDBImage1
- SQLSERVER2000 多表视图 更新
http://blog.csdn.net/21aspnet/archive/2007/03/25/1540301.aspx
好帖
在一张位图上画一个圈圈,或是方框,随便你.然后将位图贴到image 上,最后将图片贴到视频窗,不过要在解码时贴上去
在定时器中贴歌词
procedure TLrcFrm.Timer2Timer(Sender: TObject);
begin
Bitmap.Width:=Image1.Width;
Bitmap.Height:=Image1.Height;
GetCurrectXml(Bitmap,TotalTime + Timer2.Interval); //传递的是累加时间
TotalTime := TotalTime + Timer2.Interval;
Bitmap.Canvas.Draw(image1.Left,image1.Top,image1.Picture.Graphic);
Image1.Picture.Bitmap:=Bitmap;
end;
if (IsDrawPoint) and (XMLLineList[0].StartTime * 1000 <= CurrectTime +4000)then//当当前时间改变时,不能重画点
begin
PointTime := PointTime + Timer2.Interval;
Bmp.Canvas.Brush.Style := bsClear;
ColorRect.Top := 20;
ColorRect.Bottom := 40;
for i := 0 to PointCount - 1 do //由于每次都要重画,如果只画一次,会一闪而过
//当时间到一秒时,清除选定的颜色,并少画一个矫形
begin
ColorRect.Left := FontLeft + i * 30;
ColorRect.Right:= FontLeft + 20 + i * 30;
//Image1.Canvas.Ellipse(Image1.left , 20 ,Image1.left + 20 , 40); //画圆,这个出来就是白色的....
Bmp.Canvas.Brush.Color := clFuchsia; //画布颜色为透明色
Bmp.Canvas.FillRect(ColorRect); //画框
end;
PointLeft := ColorRect.Left;
PointRight := ColorRect.Right; if (PointTime = 1000) and (PointCount >=0 ) then //一秒后 填充为白色,同时坐标往后移
begin
PointTime := 0;
ColorRect.Left := PointLeft;
ColorRect.Right := PointRight ;
Bmp.Canvas.Brush.Color := clWhite;
Bmp.Canvas.FillRect(ColorRect);
PointLeft := PointLeft - 30;
PointRight := PointRight - 30;
Dec(PointCount);
if PointCount = 0 then
IsDrawPoint := false;
end;
end;
上面这段代码是写在 GetCurrectXml 函数中的,楼主只要将定时器中的代码改为传递视频播放的当前时间就可以了