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

Making Pen 2

procedure TXBitmap.XDot(x,y : integer);
begin
Dot(x,y);
makeModRect(x,y,x,y,(FXPenwidth shr 1)+2);
end;

procedure TXBitmap.Dot(x,y : integer);
//write a single dot,
//use FXpenwidth,Xcliprect,Xlevel,FXpencolor
var i,j : byte;
bitmask,pline : DWORD;
p : PDW; //PDW is pointer to DWORD
xi,yj : integer;
begin
x := x - FXpenBias;
y := y - FXpenBias;
for j := 0 to FXpenwidth-1 do
begin
bitmask := 1;
yj := y + j;
if (yj < FXcliprect.top) or (yj >= FXcliprect.bottom) then continue;
pline := FXpbase-FXlineStep*(yj); //pline points to 1st DWORD of row
for i := 0 to FXpenWidth-1 do
begin
xi := x + i;
if (xi >= FXcliprect.left) and (xi < FXcliprect.right) then
begin
p := PDW(pline + (xi) shl 2); //p points to pixel
if (FXpen[j] and bitmask) <> 0 then
if FXpenlevel <= (p^ and $3) then p^ := FXpencolor;
end;
bitmask := bitmask shl 1;
end;//for i
end;//for j
end;

1 komentar:

Anonim mengatakan...

Vg Vgmv - YouTube - VgVideoL.CC
VgV was the first Vg video game released for Sega Mega Drive (Mega-CD) in the USA. VgV is the sequel to the Sega Genesis. The game mp3 juice was released in 1993.

Posting Komentar