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
Fill Rectangle XFillrect Method
procedure TForm1.BitBtn7Click(Sender: TObject);
//xdot fill timing
type PDW = ^DWORD;
var x,y : byte;
k : word;
p,pbase,pline : PDW;
begin
clearBM;
t1 := gettickCount;
pbase := bm.scanline[0];
for k := 1 to 10000 do
for y := 0 to 99 do
begin
pline := PDW(DWORD(pbase) - y*400);
for x := 0 to 99 do
begin
p := PDW(DWORD(pline) + (x shl 2));
p^ := $0080ff;
end;
end;
t2 := gettickcount;
showtime(100000000);
end;
//xdot fill timing
type PDW = ^DWORD;
var x,y : byte;
k : word;
p,pbase,pline : PDW;
begin
clearBM;
t1 := gettickCount;
pbase := bm.scanline[0];
for k := 1 to 10000 do
for y := 0 to 99 do
begin
pline := PDW(DWORD(pbase) - y*400);
for x := 0 to 99 do
begin
p := PDW(DWORD(pline) + (x shl 2));
p^ := $0080ff;
end;
end;
t2 := gettickcount;
showtime(100000000);
end;
0 komentar:
Posting Komentar