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 Xdot Method
procedure TForm1.BitBtn2Click(Sender: TObject);
//xdot line drawing
type PDW = ^DWORD;
var i : integer;
k : byte;
p,pbase : PDW;
begin
clearBM;
t1 := gettickCount;
pbase := bm.scanline[0];
for i := 1 to 1000000 do
for k := 0 to 99 do
begin
p := PDW(DWORD(pbase) + (k shl 2)- k * 400);
p^ := $0080ff;
end;
t2 := gettickcount;
showtime(100000000);
end;
//xdot line drawing
type PDW = ^DWORD;
var i : integer;
k : byte;
p,pbase : PDW;
begin
clearBM;
t1 := gettickCount;
pbase := bm.scanline[0];
for i := 1 to 1000000 do
for k := 0 to 99 do
begin
p := PDW(DWORD(pbase) + (k shl 2)- k * 400);
p^ := $0080ff;
end;
t2 := gettickcount;
showtime(100000000);
end;
0 komentar:
Posting Komentar