【发布时间】:2012-01-24 14:03:25
【问题描述】:
我做了以下代码:
procedure TForm15.Button1Click(Sender: TObject);
var
Bitmap1: TBitmap;
im: TImageControl;
Color: TColor;
Scanline: PAlphaColorArray;
x,y,i: Integer;
begin
for i:= 1 to 100 do begin
im:= ImageControl1;
Bitmap1:= TBitmap.Create(100,100);
try
for y:= 0 to 99 do begin
ScanLine:= Bitmap1.ScanLine[y];
for x:= 0 to 99 do begin
ScanLine[x]:= Random(MaxInt);
end;
end;
ImageControl1.Canvas.BeginScene;
ImageControl1.Canvas.DrawBitmap(Bitmap1, RectF(0,0,Bitmap1.Width, Bitmap1.Height)
,im.ParentedRect,1,true);
ImageControl1.Canvas.EndScene;
finally
Bitmap1.Free;
end;
end;
end;
有没有更快的方法在 Firemonkey 中绘制像素?
我的目标是使用康威的生活游戏制作一个演示程序。
【问题讨论】:
-
你的 Firemonkey 是什么版本?在柏林 10.1 中,代码不起作用。
标签: delphi delphi-xe2 firemonkey