

测一下效率
image1.Canvas.Brush.Color := clBtnFace;
image1.Canvas.FillRect(0, 0, image1.Width, image1.Height);
Randomize;
t := Windows.GetTickCount;
for i := 0 to 100000 do
with image1.Canvas do
begin
Pen.color:=Random(255*255*255);
Line(300, 300, Random(600), random(600));
end;
Caption := IntToStr(Windows.GetTickCount - t);
2秒多,d7不到一秒