1,183
社区成员
发帖
与我相关
我的任务
分享
var
i:Integer;
a:TVideoDriver;
b:bool;
c:trect;
begin
a:=TVideoDriver.Create;
b:=True;
c.Left:=0;
c.Top:=0;
c.right:=screen.Width;
c.Bottom:=screen.Height;
a.Activate(b,@c);
a.MapSharedbuffers(b);
for i:=0 to a.bufdata.buffer.counter -1 do
begin
with a.bufdata.buffer.pointrect[i] do
begin
image1.Picture.Bitmap.Canvas.brush.color:= color;
Image1.Picture.Bitmap.Canvas.FillRect(rect);
//Memo1.Lines.Add(IntToStr(rect.Top)+' '+IntToStr(rect.Left)+' '+IntToStr(rect.Right)+' '+IntToStr(rect.Bottom)+' '+ ColorToString(color));
end;
end;
Image1.Refresh;
a.UnMapSharedbuffers;
a.Deactivate;
end;
出来的图是黑色,或者是乱色,麻烦各位大哥指点下,谢谢!