Recent Posts
Selamat datang di Coding Delphi Land Weblog kumpulan source code pemogram delphi
(Bukan maksud untuk menggurui tetapi marilah kita berbagi ilmu tuk perkembangan kemajuan teknologi kita
Selasa, 17 November 2009
Draw Line Scanline Method
procedure TForm1.BitBtn3Click(Sender: TObject);
//scanline line drawing
type PDW = ^DWORD;
var i : integer;
k : byte;
p,pbase : PDW;
begin
clearBM;
t1 := gettickCount;
for i := 1 to 10000 do
for k := 0 to 99 do
begin
pbase := bm.scanline[k];
p := PDW(DWORD(pbase) + (k shl 2));
p^ := $ff00ff;
end;
t2 := gettickcount;
showtime(1000000);
end;
//scanline line drawing
type PDW = ^DWORD;
var i : integer;
k : byte;
p,pbase : PDW;
begin
clearBM;
t1 := gettickCount;
for i := 1 to 10000 do
for k := 0 to 99 do
begin
pbase := bm.scanline[k];
p := PDW(DWORD(pbase) + (k shl 2));
p^ := $ff00ff;
end;
t2 := gettickcount;
showtime(1000000);
end;
0 komentar:
Posting Komentar