.NET大ブーム7 Del厨必死だNE!
■ このスレッドは過去ログ倉庫に格納されています
0071これ移植してみて
NGNGuses Windows, Graphics, ShellApi, SysUtils;
function MandFunc(x0,y0,x1,y1:double):TBitmap;
var cl:array [0..1000] of TColor;
function func(x0,y0:double):TColor;
var i:Integer; x,y,w:double;
begin x:=x0; y:=y0;
for i:=0 to High(cl) do begin w:=2*x*y; x:=x*x-y*y +x0; y:=w+y0;
if x*x+y*y>4.0 then break;
end; result:=cl[i];
end;
var x,y , xs,ys:Integer;
begin
for x:=0 to High(cl) do
cl[x]:=round( sin(x/High(cl)*PI/2)*255)
+round( sin(x/High(cl)*PI*3)*255)*$100
+round( sin(x/High(cl)*PI*5)*255)*$10000;
Result:=TBitmap.Create;
with Result do begin Width :=640;Height:=480;PixelFormat:=pf24bit;
xs:=Width ; ys:=Height ;
for y:=0 to Height-1 do for x:=0 to Width -1 do Canvas.Pixels[x,y]:=func( x0+x/xs*(x1-x0),y0+y/ys*(y1-y0));
end;
end;
var stime:Integer;
begin
stime:=GetTickCount;
with MandFunc(-1.5,-1,0.5,1) do try
Canvas.TextOut(0,0,Format('%dmS',[(GetTickCount-stime)])); SaveToFile('temp.bmp');
finally free;end;
ShellExecute(0,'Open','temp.bmp',nil,nil,SW_SHOW);
end.
■ このスレッドは過去ログ倉庫に格納されています